Skip to content

Instantly share code, notes, and snippets.

View mario-loza's full-sized avatar

Mario Alejandro Loza Armand Ugon mario-loza

View GitHub Profile
//Sample A
public enum UserType
{
Admin,
User
}
//To verify a seting
if (userType == UserType.Admin)
{
//To verify a seting
if (userType == "Admin")
{
IsAdmin = true;
}
//Or To define a Process inside a function
if (process == "CreditExtension")
{
calculateInterest = true;
public int Age
{
get { return age_; }
set {
if (value > 0 && value < 120)
age_ = value;
}
}
public string Address
@mario-loza
mario-loza / reallyusingproperties.cs
Last active February 9, 2017 21:32
reallyusingproperties_post
public class Person
{
private string name_;
private int age_;
private string address_;
public string Address
{ get { return address_; }
set { address_ = value;}
}