@@ -13,6 +13,7 @@ public interface IDynamicNumber
13
13
object ConvertFrom ( object value ) ;
14
14
bool TryParse ( string str , out object result ) ;
15
15
string ToString ( object value ) ;
16
+ object DefaultValue { get ; }
16
17
17
18
object add ( object lhs , object rhs ) ;
18
19
object sub ( object lhs , object rhs ) ;
@@ -53,6 +54,7 @@ public bool TryParse(string str, out object result)
53
54
}
54
55
55
56
public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
57
+ public object DefaultValue => default ( sbyte ) ;
56
58
57
59
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
58
60
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -93,6 +95,7 @@ public bool TryParse(string str, out object result)
93
95
}
94
96
95
97
public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
98
+ public object DefaultValue => default ( byte ) ;
96
99
97
100
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
98
101
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -133,6 +136,7 @@ public bool TryParse(string str, out object result)
133
136
}
134
137
135
138
public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
139
+ public object DefaultValue => default ( short ) ;
136
140
137
141
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
138
142
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -173,6 +177,7 @@ public bool TryParse(string str, out object result)
173
177
}
174
178
175
179
public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
180
+ public object DefaultValue => default ( ushort ) ;
176
181
177
182
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
178
183
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -213,6 +218,7 @@ public bool TryParse(string str, out object result)
213
218
}
214
219
215
220
public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
221
+ public object DefaultValue => default ( int ) ;
216
222
217
223
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
218
224
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -253,6 +259,7 @@ public bool TryParse(string str, out object result)
253
259
}
254
260
255
261
public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
262
+ public object DefaultValue => default ( uint ) ;
256
263
257
264
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
258
265
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -293,6 +300,7 @@ public bool TryParse(string str, out object result)
293
300
}
294
301
295
302
public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
303
+ public object DefaultValue => default ( long ) ;
296
304
297
305
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
298
306
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -333,6 +341,7 @@ public bool TryParse(string str, out object result)
333
341
}
334
342
335
343
public string ToString ( object value ) => Convert ( value ) . ToString ( ) ;
344
+ public object DefaultValue => default ( ulong ) ;
336
345
337
346
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
338
347
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -373,6 +382,7 @@ public bool TryParse(string str, out object result)
373
382
}
374
383
375
384
public string ToString ( object value ) => Convert ( value ) . ToString ( "r" , CultureInfo . InvariantCulture ) ;
385
+ public object DefaultValue => default ( float ) ;
376
386
377
387
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
378
388
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -413,6 +423,7 @@ public bool TryParse(string str, out object result)
413
423
}
414
424
415
425
public string ToString ( object value ) => Convert ( value ) . ToString ( "r" , CultureInfo . InvariantCulture ) ;
426
+ public object DefaultValue => default ( double ) ;
416
427
417
428
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
418
429
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
@@ -453,6 +464,7 @@ public bool TryParse(string str, out object result)
453
464
}
454
465
455
466
public string ToString ( object value ) => Convert ( value ) . ToString ( CultureInfo . InvariantCulture ) ;
467
+ public object DefaultValue => default ( decimal ) ;
456
468
457
469
public object add ( object lhs , object rhs ) => Convert ( lhs ) + Convert ( rhs ) ;
458
470
public object sub ( object lhs , object rhs ) => Convert ( lhs ) - Convert ( rhs ) ;
0 commit comments