Notifications
Clear all

C sharp help

5 Posts
3 Users
0 Reactions
210 Views
(@fwh-geirrod)
Posts: 947
Member
Topic starter
 

I am trying to find a list of the functions and what they do. Somehow I am not keeping up with this class. It started very slow and jump into programming without explaining why people are using the functions they are.

I have done several searches online, nothing that shows a list of what I need. I have asked for help in the class, little response. The professor has offered help, but it's hard to talk on the phone with the kids. I like to teach myself these things but I need the data.

So I am looking for info like why or when do you use

double

int

char

etc etc.

I took a logic class and I understand how to flow chart and construct a program, I just need to learn how to tell the damn computer what I want.

I have Micrsoft Visual Studio 2010 professional.

 
Posted : 25/09/2011 5:50 am
(@fwh-geirrod)
Posts: 947
Member
Topic starter
 

I think I may have found what I'm looking for. But any resources would be thanked greatly.

 
Posted : 25/09/2011 6:07 am
FWH Shishion
(@fwh-shishion)
Posts: 120
Member
 

FWH Geirrod wrote:
So I am looking for info like why or when do you use
double
int
char
etc etc.


What you have listed above are datatypes. If your question is which datatype to use when, the main thing to know is how much space each datatype takes and what the types are. For example, a double would be used if you need a numeric value with decimal places where an int would be used for whole numbers. Other examples of choices would be between a short, int, or uint. Short and int would both allow for whole integers, but a short takes up half the space of an int. The tradeoff you get is that a short will only allow values from -32k to 32k where an int will allow values from like -2 billion to 2 billion. The difference between the uint and int is that the uint will only take positive numbers but give you a range from 0 to 4 billion. Rule of thumb is use what you can get away with. In a classroom environment, I am sure the teacher would want you to pick the minimum size value needed to satisfy the scope of the requirement. There are similiar differences between values like ushort and short (the u is for unsigned). char and string are your literals where char is one character and string is n characters.


Hope that helps.

 
Posted : 25/09/2011 6:43 am
(@fwh-geirrod)
Posts: 947
Member
Topic starter
 

Thank you sir.

 
Posted : 25/09/2011 7:57 am
FWHJames
(@fwhjames)
Posts: 2050
Member
 

double = Used for money most of the time. 1.00
int = larger numbers
char = a letter or a thing that is not a number.

Took the class two years ago and do not use it every day so hope that helps.

 
Posted : 25/09/2011 1:00 pm
Share: