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
Tarkov Time
UUEncode, UUDecode, XXEncode or XXDecode a string.
Delegate In C#
-Wall -std=c++14 -O0 -o a.out source_file.cpp
out parameters
Decimal test
WithoutPortNo
IMT
dxsdxsd
IF... ELSE