"Non-Static Local Function Example"

class User {
	public string Name { get; }

	public string PermanentData { get; }

	public string CreateUserDetailsString(string additionalData) {
		string CombineData() {
			return PermanentData + additionalData;
		}

		return $"{Name} ({CombineData()})";
	}
}


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