- Programming language used is C#, One of two popular programming language to develop .net application
- .Net framework; class library (library of code that Microsoft wrote to take care difficult task), the Runtime (CLR -Command language runtime) , a protective bubble that ur application lives inside that.
- Console.WriteLine() example function provided by .Net framework.
Solution Explorer |
5. .vcxproj
6. extensible markup language
metadata contains file path, previous state of the project, 7. bin directory, output of compilation process. debug folder. start running button/ debug button, contain
extra information that allow IDE to track what currently happening inside as its running.
06 | Declaring variable and assigning values duration.
Beginning in Visual C# 3.0, variables that are declared at method scope can have an implicit type var. An implicitly typed local variable is strongly typed just as if you had declared the type yourself, but the compiler determines the type. The following two declarations of i are functionally equivalent.
created a console C# application in Microsoft visual C# express edition.
namespace Variables
{
class Program
{
static void Main(string[] args)
{
//integer
int x;
//int y;
//var? will automatically define the data type of a variable.either string
or int
var myFirstName = "Bob"
x = 7;
string y = "7";
//string y = "8";
string myFirstTry = x + y;
// number + string ; y = x + 3;
// .net explicitly convert to string.
// concetenate not adding ope.
Console.WriteLine(myFirstTry);
Console.WriteLine(y);
Console.ReadLine();
//.net not smart enough to convert BOB into int
// int mySecondTry = x + y;
int mySecondTry = x + int.Parse(y);
Console.WriteLine(mySecondTry);
Console.ReadLine();
// strongly tigh language
// the data type must be declared
// and must be ownered
// string myFirstName;
// myFirstName = "Alia";
Console.WriteLine(myFirstName);
Console.ReadLine();
}
}
}
Comments
Post a Comment