Skip to content

Instantly share code, notes, and snippets.

@jskeet
Created October 17, 2022 13:13
Show Gist options
  • Save jskeet/f514e46c2f0d39073527617dd13cdbda to your computer and use it in GitHub Desktop.
Save jskeet/f514e46c2f0d39073527617dd13cdbda to your computer and use it in GitHub Desktop.
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