All Types GNIIT/NIIT Solution (Mr Jerry) Follow me on G+ and Twitter for more updates Twitter @mrjerry0001 #Write for us and get paid contact us On hike App:- @mrjerry4968
Pages
- Home
- HTML LAB@HOME
- DSA LAB@HOME
- WCD LAB@HOME
- C# LAB@HOME
- RDBMS LAB@HOME
- IADRT Lab@home
- EBDD LAB@HOME
- ACPC Lab@home
- LBEPS Lab@home
- ICTWC LAB@HOME
- SQL LAB@HOME
- WINDOWS APP LAB@HOME
- JAVA LAB@HOME
- NETWORK ESSENTIALS + LAB@HOME
- ASP.NET LAB@HOME
- LBEPS CYCLE TEST
- ASP.NET CYCLE TEST
- JAVA CYCLE TEST
- RDBMS CYCLE TEST
- DSA CYCLE TEST
- NIIT-HTML CYCLE TEST
- NIIT ASSIGNMENTS
- NIIT PROJECTS
- CORE JAVA NOTES
- NIIT BOOKS
- NIIT MT SOLVED
Sunday, 3 July 2016
Friday, 24 June 2016
C# Tutorial - For Beginners & Professionals ~ Introduction to C Sharp
C# is developed by microsoft and comes after C, C++, Java. It inherits the properties of C, C++, Java, VB. We can say C# is smart and intelligent sister of Java because it do work smartly in comprasion to Java. The basic concept of C# language are same as C, C++ to whom you have learnt in C, C++ tutorials. The advance concept of C# language are as :
Object
Object is representative of the class and is responsible for memory allocation of its data members and member functions.An object is a real world entity having attributes (data type) and behaviors (functions).
Class
Class is a data structure that contains data members (constants files, events), member function methods, properties, constructor, destructor, indexers and nested type.Basically :
- It is a user defined data type.
- It is a reference type.
- Infact class is a tag or template for object.
Drawback of Class
Class does not allocate memory to its data members & member function itself.Basically memory is allocated through object of a class.Class can’t explore itself means it can not access its members itself, to access members of a class we use object of that class.
Example :
- // Namespace Declaration
- using System;
- // helper class
- class ClassA
- {
- string myString;
- // Constructor
- public ClassA(string str)
- {
- myString = str;
- }
- // Instance Method
- public void Show()
- {
- Console.WriteLine("{0}", myString);
- }
- // Destructor
- ~ClassA()
- {
- // Some resource cleanup routines
- }
- }
- // Program start class
- class ClassProgram
- {
- // Main begins program execution
- public static void Main()
- {
- // Instance of ClassA
- ClassA objA = new ClassA("Welcome to the world of C# language !!");
- // Call ClassA method
- objA.Show();
- }
- }
Share with your friends!
Subscribe to:
Posts (Atom)
