Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- internal class Test
- {
- private static int? a;
- private static int? A
- {
- get { Console.WriteLine("A Accessed"); return a; }
- set { a = value; }
- }
- private static int? b;
- private static int? B
- {
- get { Console.WriteLine("B Accessed"); return b; }
- set { b = value; }
- }
- private static int? c;
- private static int? C
- {
- get { Console.WriteLine("C Accessed"); return c; }
- set { c = value; }
- }
- //public int? testing { get; set; }
- private static void Main()
- {
- Console.WriteLine("First case");
- A = 4;
- B = 4;
- c = 4;
- int? something2 = (A ?? B) ?? C;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement