Skip to content

Instantly share code, notes, and snippets.

@tnngo2
Created May 4, 2012 06:57
Show Gist options
  • Save tnngo2/2592720 to your computer and use it in GitHub Desktop.
Save tnngo2/2592720 to your computer and use it in GitHub Desktop.
// StudentDetails.cs
partial class StudentDetails
{
public void Display()
{
Console.WriteLine("Student Roll Number: " + _rollNo);
Console.WriteLine("Student Name: " + _studName);
}
}
// StudentDetails1.cs
partial class StudentDetails
{
private int _rollNo;
private string _studName;
public StudentDetails(int num, string name)
{
_rollNo = num;
_studName = name;
}
}
public class Students
{
static void Main(string[] args)
{
StudentDetails objStudents = new StudentDetails(20,"Frank");
objStudents.Display();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment