Created
January 26, 2021 15:53
-
-
Save PrateekKumarSingh/72a26e43b63148655fb93cdcb2d52e48 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
class Book | |
{ | |
public string Name = ""; | |
public string Author = ""; | |
} | |
Book X = new Book(); | |
X.Name = "Harry Potter"; | |
X.Author = "J. K. Rowling"; | |
// reference type variable | |
Book Y = X; | |
// changing value of 'Y' variable with change value of 'X' | |
Y.Name = "The Casual Vacancy"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment