Click here to Skip to main content
15,900,816 members
Home / Discussions / C#
   

C#

 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 4:37
Member 1157009831-Mar-15 4:37 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
OriginalGriff31-Mar-15 4:47
mveOriginalGriff31-Mar-15 4:47 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 4:57
Member 1157009831-Mar-15 4:57 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
OriginalGriff31-Mar-15 4:59
mveOriginalGriff31-Mar-15 4:59 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 5:03
Member 1157009831-Mar-15 5:03 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
OriginalGriff31-Mar-15 5:10
mveOriginalGriff31-Mar-15 5:10 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 6:23
Member 1157009831-Mar-15 6:23 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
OriginalGriff31-Mar-15 6:36
mveOriginalGriff31-Mar-15 6:36 
You can't put the numbers in order without storing them in some way!

There is a Linq/Regex based solution:
C#
string inp = "40 12 1 7 24 28 7 33 27";
int min = Regex.Matches(inp, @"\d+").Cast<Match>().Min(m => int.Parse(m.Value));
But if this is your homework then that probably isn't any use to you! Laugh | :laugh:

What are you allowed to do, and what do you know how to do? (Did any of that one line of code make sense?)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...

GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 6:48
Member 1157009831-Mar-15 6:48 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 7:15
Member 1157009831-Mar-15 7:15 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
OriginalGriff31-Mar-15 8:10
mveOriginalGriff31-Mar-15 8:10 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 8:28
Member 1157009831-Mar-15 8:28 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
OriginalGriff31-Mar-15 8:45
mveOriginalGriff31-Mar-15 8:45 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 15:27
Member 1157009831-Mar-15 15:27 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
OriginalGriff31-Mar-15 22:00
mveOriginalGriff31-Mar-15 22:00 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 115700981-Apr-15 6:17
Member 115700981-Apr-15 6:17 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
OriginalGriff1-Apr-15 6:59
mveOriginalGriff1-Apr-15 6:59 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 115700981-Apr-15 9:24
Member 115700981-Apr-15 9:24 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 115700981-Apr-15 11:54
Member 115700981-Apr-15 11:54 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 6:26
Member 1157009831-Mar-15 6:26 
GeneralRe: trying to search a text file for a certain string and display it in a richTextBox Pin
Member 1157009831-Mar-15 5:01
Member 1157009831-Mar-15 5:01 
QuestionSplit list to two gridview columns in C# winforms Pin
arsale31-Mar-15 3:27
arsale31-Mar-15 3:27 
AnswerRe: Split list to two gridview columns Pin
Eddy Vluggen31-Mar-15 7:31
professionalEddy Vluggen31-Mar-15 7:31 
GeneralRe: Split list to two gridview columns Pin
arsale31-Mar-15 10:46
arsale31-Mar-15 10:46 
GeneralRe: Split list to two gridview columns Pin
Eddy Vluggen31-Mar-15 13:03
professionalEddy Vluggen31-Mar-15 13:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.