Click here to Skip to main content
15,896,453 members
Home / Discussions / C#
   

C#

 
AnswerRe: [GDI+] avoid flickering for a moving panel Pin
Judah Gabriel Himango11-Jan-06 5:06
sponsorJudah Gabriel Himango11-Jan-06 5:06 
QuestionFinding a Number in a string Pin
alvinjv11-Jan-06 3:47
alvinjv11-Jan-06 3:47 
AnswerRe: Finding a Number in a string Pin
Le centriste11-Jan-06 4:04
Le centriste11-Jan-06 4:04 
GeneralRe: Finding a Number in a string Pin
alvinjv11-Jan-06 4:07
alvinjv11-Jan-06 4:07 
GeneralRe: Finding a Number in a string Pin
Le centriste11-Jan-06 4:15
Le centriste11-Jan-06 4:15 
GeneralRe: Finding a Number in a string Pin
leppie11-Jan-06 4:25
leppie11-Jan-06 4:25 
GeneralRe: Finding a Number in a string Pin
Le centriste11-Jan-06 4:35
Le centriste11-Jan-06 4:35 
AnswerRe: Finding a Number in a string Pin
User 665811-Jan-06 4:09
User 665811-Jan-06 4:09 
There are lots of ways, depends on what you want to do with the number.

#1
mystring.IndexOf(string.Format("{0}", number)); will return -1 if the number is not found, a valid index otherwise

#2
MatchCollection matches = Regex.Matches(mystring, @"\d+", RegexOptions.Compiled) will search the string for all occurences of any digits

regards

modified 12-Sep-18 21:01pm.

GeneralRe: Finding a Number in a string Pin
alvinjv11-Jan-06 5:10
alvinjv11-Jan-06 5:10 
GeneralRe: Finding a Number in a string Pin
User 665811-Jan-06 7:15
User 665811-Jan-06 7:15 
QuestionWorker Threads Pin
akshayswaroop11-Jan-06 2:50
akshayswaroop11-Jan-06 2:50 
AnswerRe: Worker Threads Pin
lmoelleb11-Jan-06 3:09
lmoelleb11-Jan-06 3:09 
GeneralRe: Worker Threads Pin
akshayswaroop11-Jan-06 20:31
akshayswaroop11-Jan-06 20:31 
GeneralRe: Worker Threads Pin
lmoelleb11-Jan-06 20:54
lmoelleb11-Jan-06 20:54 
GeneralRe: Worker Threads Pin
akshayswaroop12-Jan-06 3:09
akshayswaroop12-Jan-06 3:09 
QuestionUnable to Load XML Pin
Samy Lahur11-Jan-06 2:32
Samy Lahur11-Jan-06 2:32 
AnswerRe: Unable to Load XML Pin
lmoelleb11-Jan-06 3:14
lmoelleb11-Jan-06 3:14 
GeneralRe: Unable to Load XML Pin
Samy Lahur11-Jan-06 4:16
Samy Lahur11-Jan-06 4:16 
AnswerRe: Unable to Load XML Pin
KaptinKrunch11-Jan-06 3:15
KaptinKrunch11-Jan-06 3:15 
GeneralRe: Unable to Load XML Pin
Samy Lahur11-Jan-06 4:15
Samy Lahur11-Jan-06 4:15 
Question.parse vs casting Pin
fmardani11-Jan-06 2:27
fmardani11-Jan-06 2:27 
AnswerRe: .parse vs casting Pin
User 665811-Jan-06 3:03
User 665811-Jan-06 3:03 
AnswerRe: .parse vs casting Pin
Curtis Schlak.11-Jan-06 3:25
Curtis Schlak.11-Jan-06 3:25 
AnswerRe: .parse vs casting Pin
Guffa11-Jan-06 11:17
Guffa11-Jan-06 11:17 
QuestionHow to get the IP address of the current host? Pin
bouli11-Jan-06 1:13
bouli11-Jan-06 1:13 

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.