@@ -13,6 +13,7 @@ public interface IDynamicNumber
1313 object ConvertFrom ( object value ) ;
1414 bool TryParse ( string str , out object result ) ;
1515 string ToString ( object value ) ;
16+ object DefaultValue { get ; }
1617
1718 object add ( object lhs , object rhs ) ;
1819 object sub ( object lhs , object rhs ) ;
@@ -53,6 +54,7 @@ public bool TryParse(string str, out object result)
5354 }
5455
5556 public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
57+ public object DefaultValue => default ( sbyte ) ;
5658
5759 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
5860 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -93,6 +95,7 @@ public bool TryParse(string str, out object result)
9395 }
9496
9597 public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
98+ public object DefaultValue => default ( byte ) ;
9699
97100 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
98101 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -133,6 +136,7 @@ public bool TryParse(string str, out object result)
133136 }
134137
135138 public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
139+ public object DefaultValue => default ( short ) ;
136140
137141 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
138142 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -173,6 +177,7 @@ public bool TryParse(string str, out object result)
173177 }
174178
175179 public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
180+ public object DefaultValue => default ( ushort ) ;
176181
177182 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
178183 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -213,6 +218,7 @@ public bool TryParse(string str, out object result)
213218 }
214219
215220 public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
221+ public object DefaultValue => default ( int ) ;
216222
217223 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
218224 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -253,6 +259,7 @@ public bool TryParse(string str, out object result)
253259 }
254260
255261 public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
262+ public object DefaultValue => default ( uint ) ;
256263
257264 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
258265 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -293,6 +300,7 @@ public bool TryParse(string str, out object result)
293300 }
294301
295302 public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
303+ public object DefaultValue => default ( long ) ;
296304
297305 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
298306 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -333,6 +341,7 @@ public bool TryParse(string str, out object result)
333341 }
334342
335343 public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
344+ public object DefaultValue => default ( ulong ) ;
336345
337346 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
338347 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -373,6 +382,7 @@ public bool TryParse(string str, out object result)
373382 }
374383
375384 public string ToString ( object value ) => Convert ( value ) . ToString ( "r" , CultureInfo . InvariantCulture ) ;
385+ public object DefaultValue => default ( float ) ;
376386
377387 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
378388 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -413,6 +423,7 @@ public bool TryParse(string str, out object result)
413423 }
414424
415425 public string ToString ( object value ) => Convert ( value ) . ToString ( "r" , CultureInfo . InvariantCulture ) ;
426+ public object DefaultValue => default ( double ) ;
416427
417428 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
418429 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -453,6 +464,7 @@ public bool TryParse(string str, out object result)
453464 }
454465
455466 public string ToString ( object value ) => Convert ( value ) . ToString ( CultureInfo . InvariantCulture ) ;
467+ public object DefaultValue => default ( decimal ) ;
456468
457469 public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
458470 public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
0 commit comments