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

C#

 
GeneralRe: Encrypt bitmap image for C# Windows application Pin
nudma19-Mar-09 7:13
nudma19-Mar-09 7:13 
GeneralRe: Encrypt bitmap image for C# Windows application Pin
Henry Minute19-Mar-09 7:31
Henry Minute19-Mar-09 7:31 
GeneralRe: Encrypt bitmap image for C# Windows application Pin
nudma24-Mar-09 6:42
nudma24-Mar-09 6:42 
QuestionString to int Pin
mrithula818-Mar-09 23:47
mrithula818-Mar-09 23:47 
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 
The difference is that if you pass a string to int.parse() that is not a valid string (contains noon-numeric characters) it will throw an exception that you will need to manually handle.

If you use my method the error is handled automatically and the result is set to 0, its up to you if you want to handle the error yourself thou, depends how much validation control you need.

if you are expecting the result could sometimes be 0 as a result then you may be best to handle the error yourself. but in the case of a port number you shouldnt need to do this, just check if result is 0 for an error.

Life goes very fast. Tomorrow, today is already yesterday.

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 
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 

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.