This C# tutorial is about datatypes, Variable and Strings handling in C# programming Language. Online video Lecture is embedded with C# example code will make it easy learning. It is about the CS619 Test Phase 1 “Datatypes and Variables”. This the third video in which we will demonstrate the concept of datatype, varibales and strings in Microsoft C# Sharp for those students who has enrolled/registered in CS619 in Fall 2015 semester for the first time in virtual university.
How to work with Datatypes, Variables and Strings C# Sharp
There are four aspects of this topic in the Step 1: Selection of Development Environment
To select development environment (Programming language, Database etc.) a survey form will be emailed to all students registering in the project so every student must fill it before 20 November 2015.
Step 2: Learning Programming Concepts :
Learning/Testing Phase-1: Basic Programming Concepts
- what are datatypes of C#
- rules for naming variables
- casting: user defined converting one datatype into another datatype
- implicit casting : automatic/default casting by compiler
Variable declaration examples in C#
Same as in C/C++ and JAVA. write datatype first and then the name of the variables. You may declare more than one variables of same type in one line. You are also allowed to declare and initilize in the same line.int i;
int i,j.k=12;
float j=0.0;
j=i;
C# explicit casting:
float j=45.12;
int x=0;
x=(int) j;////compiler error
x=Int32.parse(j); // correct way..
C# String variable handling
old way of handling chars and strings in C/C++
char ch='a';
char *ch[10]="Pakistan";
// just declare string variables like other datatypes and use in C#
string mystr="Pakistan";
How to work with Datatypes, Variables and Strings C# Sharp Video
working with Strings, Datatypes, Varibles C# Sharp by theiteducation