Created
October 17, 2022 13:13
-
-
Save jskeet/f514e46c2f0d39073527617dd13cdbda to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
class Program | |
{ | |
static void Main() | |
{ | |
MySetting setting = new MySetting() | |
{ | |
Value = Double.NaN, | |
Values = new double[] { Double.NaN }, | |
Special = "" | |
}; | |
} | |
} | |
public class ValueSpecial | |
{ | |
public string Code { get; set; } | |
public string Value { get; set; } | |
public override string ToString() | |
{ | |
return "dummy"; | |
} | |
} | |
public class MySetting | |
{ | |
public Double Value { get; set; } | |
public string Special { get; set; } | |
public Double[] Values { get; set; } | |
public ValueSpecial[] Specials { get; set; } | |
public ValueSpecial AddSpecial(string code, string value) | |
{ | |
ValueSpecial special = new ValueSpecial() { Code = code, Value = value }; | |
return special; | |
} | |
public void ForgetSpecial(string code) | |
{ | |
} | |
public override string ToString() | |
{ | |
return "Not today"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment