Click here to Skip to main content
15,889,403 members
Home / Discussions / C#
   

C#

 
AnswerRe: String to int Pin
musefan18-Mar-09 23:50
musefan18-Mar-09 23:50 
GeneralRe: String to int Pin
Michael Bookatz19-Mar-09 0:54
Michael Bookatz19-Mar-09 0:54 
GeneralRe: String to int Pin
Mohammad Dayyan19-Mar-09 1:03
Mohammad Dayyan19-Mar-09 1:03 
GeneralRe: String to int Pin
musefan19-Mar-09 1:08
musefan19-Mar-09 1:08 
GeneralRe: String to int Pin
Michael Bookatz19-Mar-09 1:14
Michael Bookatz19-Mar-09 1:14 
GeneralRe: String to int Pin
DaveyM6919-Mar-09 2:09
professionalDaveyM6919-Mar-09 2:09 
GeneralRe: String to int Pin
musefan19-Mar-09 2:15
musefan19-Mar-09 2:15 
GeneralRe: String to int Pin
Mirko198019-Mar-09 1:11
Mirko198019-Mar-09 1:11 
If the input string is not a valid integer, int.Parse throws an exception, while int.TryParse returns false without setting result value.

e.g.
string wrong = "xyz";
result = int.Parse(wrong); // an exception is thrown here

string wrong = "xyz";
int result = -1;
bool success = int.TryParse(wrong, out result); // success is false, while result will still be -1

GeneralRe: String to int Pin
Michael Bookatz19-Mar-09 1:16
Michael Bookatz19-Mar-09 1:16 
GeneralRe: String to int Pin
Mirko198019-Mar-09 1:36
Mirko198019-Mar-09 1:36 
GeneralRe: String to int Pin
Michael Bookatz19-Mar-09 2:11
Michael Bookatz19-Mar-09 2:11 
GeneralRe: String to int Pin
DaveyM6919-Mar-09 2:11
professionalDaveyM6919-Mar-09 2:11 
AnswerRe: String to int Pin
DaveyM6919-Mar-09 0:18
professionalDaveyM6919-Mar-09 0:18 
GeneralRe: String to int Pin
Greg Chelstowski19-Mar-09 0:57
Greg Chelstowski19-Mar-09 0:57 
GeneralRe: String to int Pin
DaveyM6919-Mar-09 2:18
professionalDaveyM6919-Mar-09 2:18 
QuestionBuild number control Pin
12Code18-Mar-09 23:25
12Code18-Mar-09 23:25 
AnswerRe: Build number control Pin
Nagy Vilmos18-Mar-09 23:35
professionalNagy Vilmos18-Mar-09 23:35 
GeneralRe: Build number control Pin
Simon P Stevens18-Mar-09 23:48
Simon P Stevens18-Mar-09 23:48 
GeneralRe: Build number control [modified] Pin
12Code19-Mar-09 0:06
12Code19-Mar-09 0:06 
GeneralRe: Build number control Pin
Simon P Stevens19-Mar-09 0:10
Simon P Stevens19-Mar-09 0:10 
GeneralRe: Build number control Pin
Nagy Vilmos19-Mar-09 0:19
professionalNagy Vilmos19-Mar-09 0:19 
QuestionAllocating opacity for a control in Win App ? Pin
Mohammad Dayyan18-Mar-09 23:17
Mohammad Dayyan18-Mar-09 23:17 
AnswerRe: Allocating opacity for a control in Win App ? Pin
musefan18-Mar-09 23:36
musefan18-Mar-09 23:36 
QuestionRectangle background color Pin
yesu prakash18-Mar-09 23:15
yesu prakash18-Mar-09 23:15 
AnswerRe: Rectangle background color Pin
musefan18-Mar-09 23:35
musefan18-Mar-09 23:35 

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.