Last active
August 29, 2015 14:15
-
-
Save tolpp/cedc4d19a21dcf5d8281 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 MyC | |
{ | |
private string _isim; | |
public string Isim | |
{ | |
get { return _isim; } // getIsim() fonksiyonundan kurtaran get propertysi | |
set { _isim = value; } // setIsim(string isim) fonksiyonundan kurtaran set propertysi | |
} | |
public MyC(string s){this._isim=s;} //MyC sınıfımın yapıcı (constructor) metodu | |
} |
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
MyC Tol = new MyC("Ali"); | |
Tol.Isim = "Tolga"; // Property üzerinden MyC tipindeki Tol'un _isim değişkenine değer atıyorum | |
Console.WriteLine(Tol.Isim); // Tol.Isim diyerek Tol'un get propertysinden dönen değeri kullanıyorum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment