Consider the following example…
string strCount="32";
int count1 = Convert.ToInt32(strCount);
int count2 = int.Parse(strCount);
If you print the result it will be same i.e. 32
If suppose the string is the null,
Convert.ToInt32 will return zero.
but the int.Parse will throw ArgumentNullException error.
string strCount=null;
int count1 = Convert.ToInt32(strCount); // Returns 0
int count2 = int.Parse(strCount); // Error
Subscribe to:
Post Comments (Atom)
Ajax CalendarExtender displaying at wrong position in Chrome
< script type ="text/javascript" language ="javascript"> function onCalendarShown(sender, args)...
-
Suppose FieldName is the Bit field which tells whether the link should be visible true or false so design your gridview template like th...
-
This function can be used to retrieve the current page:s name, i.e default.aspx, hello.aspx or whatever. public string GetCurrentPage...
-
There are various ways using which you can navigate back to the previous page. To keep the example short and simple, I will be using two ...
This is an interview question. Continue ur gd wrk
ReplyDelete