Created
May 7, 2013 10:47
-
-
Save dkalamari/5531767 to your computer and use it in GitHub Desktop.
Shallow copy
This file contains 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
public class Korisnik | |
{ | |
public string Ime { get; set; } | |
public string Prezime { get; set; } | |
public int oib { get; set; } | |
public Korisnik getShallow() | |
{ | |
return (Korisnik)this.MemberwiseClone(); | |
} | |
} | |
//Korištenje: Korisnik kor2 = kor1.getShallow(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment