Advertisement
smeacham

Global.cs

May 31st, 2016
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ScratchVS
  8. {
  9.     class Global
  10.     {
  11.         private Global()
  12.         {
  13.         }
  14.  
  15.         private static Global _instance;
  16.         public static Global Instance
  17.         {
  18.             get
  19.             {
  20.                 if (_instance == null)
  21.                 {
  22.                     _instance = new Global();
  23.                 }
  24.                 return _instance;
  25.             }
  26.         }
  27.  
  28.         public String myData { get; set; }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement