未找到CultureAndRegionInfoBuilder

时间:2012-10-11 14:18:13

标签: asp.net cultureinfo

我想添加自定义文化,我添加了以下代码但是我收到以下错误:

  

“找不到类型或命名空间CultureAndRegionInfoBuilder,是否缺少指令或程序集引用”

虽然我使用System.Globalization并添加了sysglobal.dll

string culture = "en-JO";
string name = "Jordan English";

CultureInfo cultureInfo = new CultureInfo("en-GB");
RegionInfo regionInfo = new RegionInfo(cultureInfo.Name);

CultureAndRegionInfoBuilder cultureAndRegionInfoBuilder = 
      new CultureAndRegionInfoBuilder(culture, CultureAndRegionModifiers.None);

cultureAndRegionInfoBuilder.LoadDataFromCultureInfo(cultureInfo);
cultureAndRegionInfoBuilder.LoadDataFromRegionInfo(regionInfo);

cultureAndRegionInfoBuilder.CultureEnglishName = name;
cultureAndRegionInfoBuilder.CultureNativeName = name;

cultureAndRegionInfoBuilder.Register();

0 个答案:

没有答案