예제 #1
0
 public void ChangeValueOut(out someStruct _struct)
 {
     _struct.Number = 0;
     _struct.DecimalNumber = 0m;
     _struct.DoubleNumber = 0;
     _struct.StringValue = string.Empty;
 }
예제 #2
0
 public void ChangeValue(ref someStruct _struct)
 {
     _struct.Number = _struct.Number * 2;
     _struct.DecimalNumber = _struct.DecimalNumber * 2;
     _struct.DoubleNumber = _struct.DoubleNumber * 2;
     _struct.StringValue = _struct.StringValue + _struct.StringValue;
 }
 public void ChangeValueOut(out someStruct _struct)
 {
     _struct.Number        = 0;
     _struct.DecimalNumber = 0m;
     _struct.DoubleNumber  = 0;
     _struct.StringValue   = string.Empty;
 }
 public void ChangeValue(ref someStruct _struct)
 {
     _struct.Number        = _struct.Number * 2;
     _struct.DecimalNumber = _struct.DecimalNumber * 2;
     _struct.DoubleNumber  = _struct.DoubleNumber * 2;
     _struct.StringValue   = _struct.StringValue + _struct.StringValue;
 }
        private void InitialiseStruct()
        {
            myNumber         = 10;
            myDecimalNumber  = 10.20m;
            myDoubleNumber   = 10.10;
            myStringValue    = "Test String";
            myPropertyNumber = 20;
            myPropertystring = "Test property string";
            someStruct       = new someStruct();

            someStruct.Number        = myNumber;
            someStruct.DecimalNumber = myDecimalNumber;
            someStruct.DoubleNumber  = myDoubleNumber;
            someStruct.StringValue   = myStringValue;
        }
예제 #6
0
        private void InitialiseStruct()
        {
            myNumber = 10;
            myDecimalNumber = 10.20m;
            myDoubleNumber = 10.10;
            myStringValue = "Test String";
            myPropertyNumber = 20;
            myPropertystring = "Test property string";
            someStruct = new someStruct();

            someStruct.Number = myNumber;
            someStruct.DecimalNumber = myDecimalNumber;
            someStruct.DoubleNumber = myDoubleNumber;
            someStruct.StringValue = myStringValue;
        }