using System;
public class Student
{
int id;// data member( instance variable )
String name;
public static void Main()
Student s1 = new Student();// creating of object
s1.id = 1;
s1.name = "ahmad";
Console.WriteLine(s1.id +" "+s1.name);
//Console.WriteLine(s1.name);
// since c# is object oriented language
// program is designed using class object
//برنامه نویسی شی گرا
// class is a blue print
// field, method
// for implementing this class we need object
//
// object is an instance of a class
// all the members of the class can be accessed through object
//in c# , object is a real world entity
//for example: laptop, car, chair, mobile etc
// object is a runtime enity
// object has: state and behavior
// state means data, behavior mean functionality.
// car objname = new car(); // creating object
// Class is a group of similar objects
// class can have fields, methods, constructors
}