.NET

/*
.NET
-------------
|--By Microsoft, It is a Kind of Framework
(Collection of classes and Library)
  --------For What --------------------
1. Internet Programming
2. Application development
3. Mobile Apps
4. System Programming
--------------------------
|--.NET : Advantage
-----------------
1. Multiple Language support / Language neutral
  Language Independent
  ----------------------------------------------
c# -- sum() ---vb.net
2. Having Pointer
|--.NET : Architecure

 Language ---Compiler --- MSIL(Microsoft Intermediate Lang)
|
     CLR(Common Language Runtime)
|
     .EXE
|--Platform Indepedent
   ----------------------
|---Can run on any platform : Windows / Linux

--.NET : for Widnows ---

--Can we run , .NET in linux --- NO
---MONO Software ---

--------------------------------------------------------------------
C# (C Sharp)
----------------------
--Language --
--It is a kind of .NET compatiable, object oriented, Event
 driven , Component oriented programming Language

--C# is the mother language of .NET

Software Required
----------------------
 Visual Studio.net : 2000  2003  2005  2008   2010  2012  2013  2015
 Framework                   1.0    1.1  2.0  3.0,3.5  4.0   4.5   4.6   4.7

C# programming
-----------------------
1. Console : Notepad | Command Prompt run
2. Windows : In visual Studio

C# is highly case sensitive
------------------------------
All Keywords  in small : public , private , class, interface
enum , namespace , interface , abstract

Class/Namespace(Collection of class)/Method:
    Every Word's First Letter :In Upper case
eg : System | Console | WriteLine


C# console programming
------------------------------
1. Open notepad
2. Open Command prompt (.NET wala)
3. Write program,save by any name in any location
  but extension .cs
4. Compile
c:\>csc a.cs  ---->a.exe
5. Run :
c:\>a
---------------------------------
*/
//First Program in c#
class a
{
public static void Main()
{
System.Console.WriteLine("Jai Hind!");
}
}

/*

d:\>csc z1.cs
d:\>z1

System : Namespace / Package
Console : Class ,defined in System
WriteLine : Method , defined in Console
   Used to display

---visual studio --- tools ---command prompt

Erroror : 1
-----------------------
D:\>csc aa.cs
'csc' is not recognized as an internal or external command,
operable program or batch file.
--Reason : wrong command prompt --
--ILaz   : Open .NET wala comand prompt  
--Visual Studio --Tools (Command prompt)
--------------------------------------------------------
Error : 2
---------------
D:\>csc aa.cs
Microsoft (R) Visual C# Compiler version 4.0.30319.33440
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.

error CS2001: Source file 'aa.cs' could not be found
warning CS2008: No source files specified
-----Reason:File is save in another location
-----Ilaz : Go in that location ..compile
-------------------------------------------------------------
Error  : 3
----------------
E:\>csc aa.cs
Microsoft (R) Visual C# Compiler version 4.0.30319.33440
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.

error CS5001: Program 'e:\aa.exe' does not contain a static 'Main' metho
        suitable for an entry point

----Reason : Main() Main kuch galat hai
Ilaz : public static void Main()

Error --4
-------------
E:\>csc aa.cs
Microsoft (R) Visual C# Compiler version 4.0.30319.33440
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.

aa.cs(2,1): error CS0116: A namespace cannot directly contain members such
        fields or methods
aa.cs(4,16): error CS1518: Expected class, delegate, enum, interface, or s

--Reason : Class .. ka C capital main hai ...
Solution : class

Error --5
---------------
E:\>csc aa.cs
Microsoft (R) Visual C# Compiler version 4.0.30319.33440
for Microsoft (R) .NET Framework 4.5
Copyright (C) Microsoft Corporation. All rights reserved.

aa.cs(6,3): error CS0103: The name 'system' does not exist in the current
        context
---Reason / Solution :System (Check system ka s..must be in upper case)
*/

Comments

Popular posts from this blog

Top Attractions on the Varanasi Tour

‘ख़ुशी

What is Twitter Bootstrap?