C# Fundamentals

Recently I’ve begun to dig into the C# tutorials on Microsoft Virtual Academy. I’ve started off at the very beginning hoping to rejuvenate my knowledge in the language and pickup any extra key information.

Up to now I’ve finished the first 6 modules which didn’t go very deep into the coding aspect but instead more heavily on Visual Studio itself and it’s interaction with you as you write code. They displayed how Intellisense works and various ways to work with the code through the Solution explorer as well as turning on Line Numbers to better reference a line of a code.

 

.NET

Class Library

-Library of code built by Microsoft to do stuff for us

-Helps with Math, Text, displaying to the screen, internet transmission

 

Run Time

-Common Language Run Time CLR

-Protective bubble application lives in

 

 

Code

How to Display Text

Console.WriteLine(“Text”);

 

How to wait for something to be pressed

Console.ReadLine();

 

Variables

Variables are buckets that hold data

 

int = integer, 8

string = string, “a string”

 

var = allows you to create a variable without declaring the exact TYPE of variable. MUST define the variable at the declaration.

var aVariable = 8′

var anotherVariable = “a string”

 

Keeping it simple…

Code is organized as blocks of code in curly braces.

 

Method

-A named block of code that can be called and executed

 

Class

-A way of naming and grouping methods

 

Namespace

-Highest level grouping tool. When you create a C# Project, the name of the project becomes the namespace in your application in Program.cs

 

Example

Console.WriteLine();

Console is a class call the method WriteLine()

Console can also call the method ReadLine()

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s