私はxmlに読み書きする小さなWM 6.1アプリを書いていますが、次の例外が発生します:
System.PlatformNotSupportedException was unhandled
Message="PlatformNotSupportedException"
StackTrace:
at System.Globalization.CompareInfo..ctor(Int32 culture)
at System.Globalization.CompareInfo.GetCompareInfo(Int32 culture)
at System.Globalization.CultureInfo.get_CompareInfo()
at System.CultureAwareComparer..ctor(CultureInfo culture, Boolean ignoreCase)
at System.StringComparer.Create(CultureInfo culture, Boolean ignoreCase)
at System.Data.DataTable.GetSpecialHashCode(String name)
at System.Data.DataColumnCollection.RegisterColumnName(String name, DataColumn column, DataTable table)
at System.Data.DataColumnCollection.BaseAdd(DataColumn column)
at System.Data.DataColumnCollection.AddAt(Int32 index, DataColumn column)
at System.Data.DataColumnCollection.Add(DataColumn column)
at System.Data.DataColumnCollection.Add(String columnName, Type type)
at MyApp.Settings.CreateDT(String Setting, String Key, String Value)
at MyApp.Program.Main()
ここに CreatDT メソッドの本体があります:
public static DataTable CreateDT(string Setting, string Key, string Value)
{
DataTable dt;
dt = new DataTable(Setting);
dt.Columns.Add("Key", Type.GetType("System.String")); //<-- error here
dt.Columns.Add("Value", Type.GetType("System.String"));
AddRow(ref dt, Key, Value);
return dt;
}
体の助けはありますか?