Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp1
  4. {
  5.     public class Program
  6.     {
  7.         public void Main(string[] args) {
  8.             Person person = null;
  9.             Console.WriteLine("house num:" + person?.Address.House);
  10.             Console.Read();
  11.         }
  12.     }
  13.  
  14.     public class Person {
  15.         public Address Address { get; set; }
  16.     }
  17.  
  18.     public class Address {
  19.         public int House { get; set; }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement