コード例 #1
0
 public SubValue(SubSubValue subSubValue, string name = "Meu nome", int age = 30, float height = 1.95F,
                 double weight = 110F)
 {
     this.name        = name;
     this.age         = age;
     this.height      = height;
     this.weight      = weight;
     this.subSubValue = subSubValue;
 }
コード例 #2
0
        public void Decode(IDecoder decoder)
        {
            this.name   = decoder.GetString();
            this.age    = decoder.GetInt();
            this.height = decoder.GetFloat();
            this.weight = decoder.GetDouble();
            var subSubValue = decoder.GetObject <SubSubValue>();

            if (subSubValue.HasValue)
            {
                this.subSubValue = subSubValue.Value;
            }
        }