Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Singletone Class
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { static Program obj=null; private static readonly object objLock=new object(); private Program(){} public static Program GetInstance { get { if(obj==null) { lock(objLock) { if(obj==null){ obj=new Program(); } } } return obj; } } public static void Main(string[] args) { Program obj1=Program.GetInstance; Program obj2=Program.GetInstance; if(obj1.Equals(obj2)) { Console.WriteLine("same object"+" "+obj1.GetHashCode()+" "+ obj2.GetHashCode()); } } } }
run
|
edit
|
history
|
help
0
MightConst - Runtime Constwrapper Value (C#)
GetMyAppintmentData
ref variables/parameters
Collections demo
Метод catch b try в словарях
Task 1_4
Get Round of 5 c# Vishal
Número primers
D19
UriParts