Last active
May 23, 2021 15:20
-
-
Save Lahirutech/fdd72946035fd67857a5e4ddbf53860c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class Student{ | |
public string StudentName { get; set; } | |
public string Course { get; set; } | |
} | |
public class Program | |
{ | |
public static void UpdateCourse(Student std2) | |
{ | |
std2.Course = "Computer Science"; | |
} | |
public static void Main() | |
{ | |
Student std1 = new Student(); | |
std1.StudentName = "Bill"; | |
std1.Course= "Not Eligible"; | |
Console.WriteLine("Course: "+std1.Course); | |
UpdateCourse(std1); | |
Console.WriteLine("Course Updated"); | |
Console.WriteLine("Course: "+std1.Course); | |
} | |
} | |
/* | |
Course: Not Eligible | |
Course Updated | |
Course: Computer Science | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment