Tuesday, 27 September 2016

5 - Common Operator in C# | Urdu | Hindi



Assignment operator =

Arithmetic Operator +, -, * ,/, %

Comparison Operator == , != ,>, >=, <, <=

Conditional Operator  &&, ||

Ternary Operator ?:


Null coalescing Operator ??

using System;
class Program
{
    static void Main()
    {
        int number = 10;
        bool isNumber10 = number == 10 ? true : false;

        Console.WriteLine("Number == 10 {0}", isNumber10);
    }
}






4 -Built in string types in C# | Urdu | Hindi




 Built-in type in C#

–Boolean type  Only true or false
–Integral type sbyte , byte , ushort, int uint ,long, ulong  , char
–Floating type  Float and double
–Decimal type
–String type ( in this session )

•Escape sequence in C#

•Verbatim literal 


A string data type represent a series of Unicode characters
string str = “ This is a message











Verbatim literal is a string with an @ symbol prefix. E.g. @Hello
•It makes escapes sequence as normal printable characters. 

Friday, 2 September 2016

3- Built-in types in C# | Urdu

In this session, we will discuss the different built-in types that are available in c#.


Built-in types in C#

1. Boolean type – Only true or false 
2. Integral Types - sbyte, byte, short, ushort, int, uint, long, ulong, char
3. Floating Types – float and double
4. Decimal Types
5. String Type  


Boolean type

It is used to declare variables to store the Boolean values, true and false.


Integral Types

 For further detail visit  :  https://msdn.microsoft.com/en-us/library/exx3b86w.aspx

Floating Types

 For further detail visit : https://msdn.microsoft.com/en-us/library/9ahet949.aspx

Decimal Types

For further detail visit : https://msdn.microsoft.com/en-us/library/364x0z75.aspx

 using System;
    class Program
    {
        static void Main()
        {
            int i = int.MaxValue;


            Console.WriteLine(i);
        } 
    }



Friday, 5 August 2016

2-Reading and Writing to Console in C# || Urdu

Reading & Writing to Console 


•Writing to the Console.
•Reading from Console
• Two ways of Writing to the Console
–Concatenation

–Place Holder Syntax- most preferred 

 Example of –Place Holder Syntax- most preferred 


using System;

    class Program
    {
       
        static void Main()
        {
            Console.WriteLine("what is your First Name ?");
            string FirstName = Console.ReadLine();

            Console.WriteLine("what is your Last Name ?");
            string LastName = Console.ReadLine();
         
            Console.WriteLine("Your Name is {0}, {1} ", FirstName, LastName);

        }
    }

1 -Introduction To C Sharp || Urdu


In this session 
•Basic structure of C# program.
•What is Namespace.
• Purpose of Main method
Basic structure of C# program.
Below is given a sample program.
  In this program we have a 3 line of code 


Basic structure of C# program:  Namespac., Main method




using System;
    class Program
    {
        static void Main()
        {
           Console.WriteLine("Hello to the world");
           Main1();
        }
        static void Main1()
        {
            Console.WriteLine("Hello to Main !");
        }
    }

At the top , we have declared a namespace System in which Console class is residing.
within Console class WritLine() method is present. Which take an argument as a string and print the message to the out output console screen. 
Using system declaration
•A namespace declaration , Using System,  indicate that you are using the system Namespace.
•A namespace is used to organize your code and is a collection of classes , interfaces, structs, enums and delegates.
Main Method is the entry point of into your application.