static void Main(string[] args) { Vacancy v_val = Vacancy.v_admin; Console.WriteLine($"type:{v_val} val:{(int)v_val}"); Console.WriteLine(v_val.ToString()); string str = null; int? a = null; bool? b = getval(); System.Nullable <bool> bb = true; if (b != null) { if ((bool)b) { Console.WriteLine("True"); } else { Console.WriteLine("False"); } } else { Console.WriteLine("NULL"); } bool def = getval() ?? true; }
public string GetFullInormation() { return($"Name: {Name}\n" + $"Vacancy: {Vacancy.ToString()}\n" + $"Salary: {Salary}\n" + $"RecepitDate: {RecepitDate[Constants.DATE_DAY]}:{RecepitDate[Constants.DATE_MONTH]}:{RecepitDate[Constants.DATE_YEAR]}"); }
public override string ToString() { return(String.Format("Имя: {0}\nДолжность: {1}\nЗарплата: {2}\nДата приема на работу: {3}-{4}-{5}\n ", Name, Vacancy.ToString(), Salary, startedToWork[0], startedToWork[1], startedToWork[2])); }