"Local Functions"

static void PrintUserReport(List<User> users) {
	string CreateBioString(User u) {
		var bioStart = $"{u.Name}: {u.AgeInYears} years old, {(DateTime.Now - u.JoinDate).TotalYears:N1} years at company";
		if (u.AgeInYears <= 18) return bioStart;
		else return $"{bioStart}; marital status: {u.MaritalStatus}";
	}
	
	foreach (var user in users) {
		Console.WriteLine(CreateBioString(user));
	}
}

// ... On User.cs ...

bool DueForPayRaise {
	get {
		bool IsEligible() {
			return AgeInYears >= 18 && (DateTime.Now - u.JoinDate).TotalYears >= 1d;
		}
		
		return IsEligible() && (DateTime.Now - u.LastPayRaise).TotalYears >= 1d;
	}
}


Code snippet taken from "Two Decades of C#: A Reference - C# 7".