Click here to Skip to main content
15,908,776 members
Home / Discussions / C#
   

C#

 
QuestionCrystal report Pin
Aayush Singh4-May-06 3:34
Aayush Singh4-May-06 3:34 
AnswerRe: Crystal report Pin
ranandbe4-May-06 20:04
ranandbe4-May-06 20:04 
Questionhow does accelerate drawing operation? Pin
Sasuko4-May-06 3:13
Sasuko4-May-06 3:13 
AnswerRe: how does accelerate drawing operation? Pin
MoustafaS4-May-06 4:35
MoustafaS4-May-06 4:35 
GeneralRe: how does accelerate drawing operation? Pin
Susuko4-May-06 9:57
Susuko4-May-06 9:57 
GeneralRe: how does accelerate drawing operation? Pin
Guffa4-May-06 6:29
Guffa4-May-06 6:29 
GeneralRe: how does accelerate drawing operation? Pin
Susuko4-May-06 9:58
Susuko4-May-06 9:58 
AnswerRe: how does accelerate drawing operation? Pin
A.Gharighi4-May-06 8:20
A.Gharighi4-May-06 8:20 
GeneralRe: how does accelerate drawing operation? Pin
Susuko4-May-06 9:56
Susuko4-May-06 9:56 
GeneralRe: how does accelerate drawing operation? Pin
A.Gharighi6-May-06 2:58
A.Gharighi6-May-06 2:58 
QuestionError when copied in to server Pin
chakkara20034-May-06 2:47
chakkara20034-May-06 2:47 
QuestionKill a process Pin
krishna194-May-06 2:41
krishna194-May-06 2:41 
AnswerRe: Kill a process Pin
V.4-May-06 3:28
professionalV.4-May-06 3:28 
GeneralRe: Kill a process Pin
krishna195-May-06 1:41
krishna195-May-06 1:41 
GeneralRe: Kill a process Pin
V.5-May-06 1:51
professionalV.5-May-06 1:51 
AnswerRe: Kill a process Pin
A.Gharighi4-May-06 8:28
A.Gharighi4-May-06 8:28 
GeneralRe: Kill a process Pin
krishna194-May-06 20:28
krishna194-May-06 20:28 
GeneralRe: Kill a process Pin
A.Gharighi6-May-06 3:00
A.Gharighi6-May-06 3:00 
GeneralRe: Kill a process Pin
krishna199-May-06 0:03
krishna199-May-06 0:03 
QuestionHow to change the DNS HostName using WMI Pin
Sharanray4-May-06 2:40
Sharanray4-May-06 2:40 
QuestionHow to process web page that is on different we bserver Pin
rohan19814-May-06 2:36
rohan19814-May-06 2:36 
QuestionDifferent string conversions to integer Pin
Brendan Vogt4-May-06 2:28
Brendan Vogt4-May-06 2:28 
AnswerRe: Different string conversions to integer Pin
Guffa4-May-06 3:39
Guffa4-May-06 3:39 
AnswerRe: Different string conversions to integer Pin
J4amieC4-May-06 3:43
J4amieC4-May-06 3:43 
Interesting question, and not really one answer, as you have asked about things which look similar but in some cases are not!

Ill try to address some of your queries.

Int32.Parse - most non-string datatypes in .NET provide an easy way to convert to that datatype from a string - mainly for convenience as programmers often use string representations. DateTime.Parse, Int16.Parse immediately come to mind.

Convert - this is a convenient helper class that knows how to do many conversions to and from every base type. However, it is just a wrapper around the actual casting & converting which can be done. For example, decompile the Convert.ToInt32(string) method and you get:
public static int ToInt32(string value)
{
      if (value == null)
      {
            return 0;
      }
      return int.Parse(value);
}

so, in essence Convert.ToInt32(String) is just using int32.Parse under the hood.

SqlDataReader.GetInt32 - This is a type-safety convenience. Rather than have to convert each read column to its a desired type, the data reader provides a type-safe way of reading each value. Without this convenience, you would have alot of this in your code

int myIntValue = (int)myDataReader["MyIntColumn"];

You should also read up on the difference between casting from one type to another, and parsing a string to a different type - that will help you understand a little more.

Hope that helps.


Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour

AnswerRe: Crystal report Pin
V.4-May-06 3:30
professionalV.4-May-06 3:30 

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.