.net question answer

----.NET ------
1. WHAT IS .NET  : IT IS A KIND OF FRAMEWORK, USED FOR INTERNET PROGRAMMING
                       |
                SET OF RULES/ COLLECTION OF LIBRARIES,CLASSES..
       
          ->MULTI LANGUAGE SUPPORT(C#/VB.NET/JSCRIPT.NET...) /LANG INDEPENDENT
          ->COMPILED , HAVING POINTER
                    |
                   UNSAFE CODE(MEMORY NOT MANAGED BY GC)
                   managed code

2. WHAT IS CLR(COMMON LANGUAGE RUNTIME)    
        |
        ITS A RUN TIME ENVIRONMENT OF .NET
3. CLS : COMMON LANGUAGE SPECIFICATION(COLLECTION OF LIBRARIES,CLASSES)
4. LINUX SUPPORT : NO
5. PLATFORM INDEPENEDNT : NO (WINDOWS)
6. IL : INTERMEDIATE LANG
    --C# ---COMPILED ---MSIL---CLR ---.EXE
5. CURRENT VERSION :
    FRAMEWORK :      4.5    4.0   3.5/3.0   2.0    1.1   1.0
    VISUAL STUDIO : 2012   2010    2008    2005   2003  2000
-------------------------------------------------------------------------
C#
---
|
IT IS A KIND OF .NET COMPATIABLE,OBJECT ORIENTED, EVENT DRIVEN PROGRAMMING
LANGUAGE

--
eg:1
----
    class a
    {
        public static void Main()
        {   
            System.Console.WriteLine("hahaha");
               |       |       |
            Namespace class     Method
        }
    }

    ---Save by any name : z1.cs
    c:\>csc z1.cs       c:\>z1
         |-z1.exe

---
1. WriteLine(\n) & Write : Diff
      |        |
   Hold Line   same line    
   Next :in Next Line        
2. Input : ReadLine / Read / ReadKey : Diff
          |
    Return  :string   int   ConsoleKeyInfo

3. Int32.Parse()           Convert.ToInt32() : Diff
   -----------------------------------------------------
   1. Convert string to int  1. Any Datatype to int
   2. Null : Error         2. Return 0

4. Int32 & Int    |  String & string
   -----   ---         ------   --------   
   Stru   Alias      class    alias 

   System.Int32=int  System.String = string

    System.Int8 : byte : 1 Byte
    System.Int16 :short : 2 Byte
    System.Int32 : int : 4 Byte
    System.Int64 : long : 8 Byte
    System.Single : float : 4 byte
   
5. What is Nullable Type.
    --- Data Type  : Value Type  & Reference Type
                |            |
              Normal        class/interface/array/delegate/   
            (int,float,long)   string/ object        
             structure
             enum
   
    --If we want to put null in Value Type(int/float), we use Nullable Type
        int ? n=null;
         
   
    --Database : salary : null
            |
        Record access            
           
6. What is command Line Argument : Passing Values at run time with file name
---------------------------------------------------------------
        c:\>a "amit" "sumit" "rajeev"    
7. Can we use multiple Main() : Yes
    class a
    {
        psvM()
        {
        }   
    }
    class b
    {
        psvM()
        {
        }   
    }
    --c:\>csc z.cs /main:a   
8. Can we start the program without class : Yes
    struct a
    {
        psvM()
        {
        }   
    }   
9. Can we write prog without Main() : Yes , but after compilation :.dll
    c:\>csc /target:library a.cs

10. Main() :
        --public static void Main()
        --public static int Main()
        --public static void Main(String[] args)
        --static void Main()
        --static public void Main()

Comments

Popular posts from this blog

Top Attractions on the Varanasi Tour

‘ख़ुशी

What is Twitter Bootstrap?