namespace ConsoleApplication1 { using System; class Program { static void Main( string[] args ) { TestClass test = TestClass.CreateClass( ) ?? new TestClass( ); } public class TestClass { public bool IsValid { get; private set; } public TestClass( ) { } public static TestClass CreateClass( ) { if ( new Random( ).Next( 1 ) == 0 ) { TestClass result = new TestClass( ); result.IsValid = true; return result; } return null; } } } }
Remember Me
a@href@title, strike
Theme based on MadsSimple dasBlog theme by Mads Kristensennewtelligence dasBlog 2.3.9074.18820
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.