public void Expression_Constructor()
 {
     BenchmarkObject  obj1 = ExpressionConstructor();
     BenchmarkObject2 obj2 = ExpressionConstructor2();
     BenchmarkObject3 obj3 = ExpressionConstructor3();
     BenchmarkObject4 obj4 = ExpressionConstructor4();
 }
 public void Direct_Constructor()
 {
     // ReSharper disable ObjectCreationAsStatement
     var obj1 = new BenchmarkObject();
     var obj2 = new BenchmarkObject2();
     var obj3 = new BenchmarkObject3();
     var obj4 = new BenchmarkObject4();
     // ReSharper restore ObjectCreationAsStatement
 }
        public string GetPropertyInfo_Property()
        {
            Type         benchmarkType     = BenchmarkObject.GetType();
            PropertyInfo benchmarkProperty = benchmarkType.GetProperty(BenchmarkObjectPropertyName);

            Type         benchmarkType2     = BenchmarkObject2.GetType();
            PropertyInfo benchmarkProperty2 = benchmarkType2.GetProperty(BenchmarkObjectPropertyName2);

            Type         benchmarkType3     = BenchmarkObject3.GetType();
            PropertyInfo benchmarkProperty3 = benchmarkType3.GetProperty(BenchmarkObjectPropertyName3);

            Type         benchmarkType4     = BenchmarkObject4.GetType();
            PropertyInfo benchmarkProperty4 = benchmarkType4.GetProperty(BenchmarkObjectPropertyName4);

            // ReSharper disable PossibleNullReferenceException
            return($"{(string)benchmarkProperty.GetValue(BenchmarkObject)}{(int)benchmarkProperty2.GetValue(BenchmarkObject2)}{(double)benchmarkProperty3.GetValue(BenchmarkObject3)}{(short)benchmarkProperty4.GetValue(BenchmarkObject4)}");
            // ReSharper restore PossibleNullReferenceException
        }
        public string GetFieldInfo_Field()
        {
            Type      benchmarkType  = BenchmarkObject.GetType();
            FieldInfo benchmarkField = benchmarkType.GetField(BenchmarkObjectFieldName);

            Type      benchmarkType2  = BenchmarkObject2.GetType();
            FieldInfo benchmarkField2 = benchmarkType2.GetField(BenchmarkObjectFieldName2);

            Type      benchmarkType3  = BenchmarkObject3.GetType();
            FieldInfo benchmarkField3 = benchmarkType3.GetField(BenchmarkObjectFieldName3);

            Type      benchmarkType4  = BenchmarkObject4.GetType();
            FieldInfo benchmarkField4 = benchmarkType4.GetField(BenchmarkObjectFieldName4);

            // ReSharper disable PossibleNullReferenceException
            return($"{(int)benchmarkField.GetValue(BenchmarkObject)}{(float)benchmarkField2.GetValue(BenchmarkObject2)}{(string)benchmarkField3.GetValue(BenchmarkObject3)}{(uint)benchmarkField4.GetValue(BenchmarkObject4)}");
            // ReSharper restore PossibleNullReferenceException
        }
        public void SetPropertyInfo_Property()
        {
            Type         benchmarkType     = BenchmarkObject.GetType();
            PropertyInfo benchmarkProperty = benchmarkType.GetProperty(BenchmarkObjectPropertyName);

            Type         benchmarkType2     = BenchmarkObject2.GetType();
            PropertyInfo benchmarkProperty2 = benchmarkType2.GetProperty(BenchmarkObjectPropertyName2);

            Type         benchmarkType3     = BenchmarkObject3.GetType();
            PropertyInfo benchmarkProperty3 = benchmarkType3.GetProperty(BenchmarkObjectPropertyName3);

            Type         benchmarkType4     = BenchmarkObject4.GetType();
            PropertyInfo benchmarkProperty4 = benchmarkType4.GetProperty(BenchmarkObjectPropertyName4);

            // ReSharper disable PossibleNullReferenceException
            benchmarkProperty.SetValue(BenchmarkObject, ValueToSet);
            benchmarkProperty2.SetValue(BenchmarkObject2, ValueToSet2);
            benchmarkProperty3.SetValue(BenchmarkObject3, ValueToSet3);
            benchmarkProperty4.SetValue(BenchmarkObject4, ValueToSet4);
            // ReSharper restore PossibleNullReferenceException
        }
        public void SetFieldInfo_Field()
        {
            Type      benchmarkType  = BenchmarkObject.GetType();
            FieldInfo benchmarkField = benchmarkType.GetField(BenchmarkObjectFieldName);

            Type      benchmarkType2  = BenchmarkObject2.GetType();
            FieldInfo benchmarkField2 = benchmarkType2.GetField(BenchmarkObjectFieldName2);

            Type      benchmarkType3  = BenchmarkObject3.GetType();
            FieldInfo benchmarkField3 = benchmarkType3.GetField(BenchmarkObjectFieldName3);

            Type      benchmarkType4  = BenchmarkObject4.GetType();
            FieldInfo benchmarkField4 = benchmarkType4.GetField(BenchmarkObjectFieldName4);

            // ReSharper disable PossibleNullReferenceException
            benchmarkField.SetValue(BenchmarkObject, ValueToSet);
            benchmarkField2.SetValue(BenchmarkObject2, ValueToSet2);
            benchmarkField3.SetValue(BenchmarkObject3, ValueToSet3);
            benchmarkField4.SetValue(BenchmarkObject4, ValueToSet4);
            // ReSharper restore PossibleNullReferenceException
        }