错误在:
public partial class Form2 : Form
Run Code Online (Sandbox Code Playgroud)
可能的原因:
public static IChromosome To<T>(this string text)
{
return (IChromosome)Convert.ChangeType(text, typeof(T));
}
Run Code Online (Sandbox Code Playgroud)
尝试(没有静态关键字):
public IChromosome To<T>(this string text)
{
return (IChromosome)Convert.ChangeType(text, typeof(T));
}
Run Code Online (Sandbox Code Playgroud)