Datatypes and Variables

Total Post:113

Points:791
C#  Students 
C#
 303  View(s)
Ratings:
Rate this:

How to initialized a Data types and Variables in C#.

  1. Post:140

    Points:984
    Re: Datatypes and Variables

    Variables and Data types in c# :

    variables like a buckets which stored data value of the type declaration. some steps for follow to declare them is shown below: 

    Step 1: Declaring variables and Assigning values :

    they stored information in string type var. syntax: 

       String FirstName = FirstNameTextBox.Text;
    

    bucket with the name that unique identifies if:

    string FirstName; 
    FirstName = "Mindstick";

    we declared first name and referenced the erroneously redeclared it. 

    string name ="Mindstick"

    1-string FirstName;
    
    2-FirstName=name;
    3-string FirstName="software";

    step2- 

      lets we have two buckets Firstname(string type) and name(mindstick) and put the name value into another.

    FirstName = name;

    var dumping its value into another buckets .boths are hold literal string "mindstick".

    step3- Understanding var naming limitations: 

    -Be atleast one alphabetic char 

    -not start with a numberacly

    -not use of dash- and underscore_

    -not contain any space between words.

    step4- Adding comments in code 

    all primitivec# data types :   bytes , sbytes, short, ushort, int,long,float,double,dec,char,string,bool,objects etc. 

    Happy coding :)

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!