DataColumn.MaxLength ^ ColumnMapping.SimpleContent
もう登録されているかもしれないけど。誰か気が向いたらMSにフィードバックしてあげて頂戴な:
using System;
using System.Data;public class Test
{
public static void Main ()
{
DataSet ds = new DataSet("Example");// Add MyType DataTable
ds.Tables.Add("MyType");// Succeeds
ds.Tables["MyType"].Columns.Add(new DataColumn("Desc",
typeof (string), "", MappingType.Attribute));
ds.Tables["MyType"].Columns["Desc"].MaxLength = 0;
ds.Tables["MyType"].Columns["Desc"].ColumnMapping = MappingType.
SimpleContent;// Fails
// ds.Tables["MyType"].Columns.Add(new DataColumn("Desc",
// typeof (string), "", MappingType.SimpleContent));
// ds.Tables["MyType"].Columns["Desc"].MaxLength = 0;System.Console.WriteLine(ds.GetXmlSchema());
}
}