コンテンツへスキップ
ものがたり
戻る

2005-01-24

NumberFormatter tested

Kazukiさんが作って下さったNumberFormatterをcorlibでテストしてみました。うーん、まだちょっと問題がありそう(^^;

throw new Exception

Monoのコードはたまに(?)イケてない部分がある。Kazukiさんのパッチを見てて気付いた。

59: -if (this == CultureInfo.CurrentCulture.NumberFormat)  

60: -throw new Exception ("HERE the value was modified");  

61: +               if (this == CultureInfo.CurrentCulture.NumberFormat)  

62: +                   throw new Exception ("HERE the value was modified");

※元々のコードが悪いんであって、パッチが悪いわけじゃあないです。

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());
}
}


コメント

謎工 — 01/24/2005 21:44:17

知財戦略本部がパブコメ募集開始。
http://www.kantei.go.jp/jp/singi/titeki2/pc/050124comment.html
文化庁のと違って3週間とそこそこ余裕があって、フォームで送れて、個人情報記入は任意と言うのは良心的ではあるものの当の推進計画は……それでも、去年の改訂ではフェアユース規定創設を視野に入れた項目が追加されるなど「揺り戻し」は起き始めているようですが。
http://www.kantei.go.jp/jp/singi/titeki2/kettei/040527f.html


この記事を共有:

前の記事
throw new Exception
次の記事
NumberFormatter tested