无法找到 ISOWeek
Unable to find ISOWeek
我正在尝试使用 ISOWeek,但我无法在任何地方找到它。我尝试了几种不同的使用方式:
var a = System.Globalization.ISOWeek.GetWeekOfYear(DateTime.Now);
var b = ISOWeek.GetWeekOfYear(DateTime.Now);
var c = new ISOWeek();
我已经尝试添加所有我能找到的 System.Runtime 参考资料,但总是出现以下错误:
error CS0234: The type or namespace name 'ISOWeek' does not exist in the namespace 'System.Globalization' (are you missing an assembly reference?)
error CS0103: The name 'ISOWeek' does not exist in the current context
error CS0246: The type or namespace name 'ISOWeek' could not be found (are you missing a using directive or an assembly reference?)
我正在使用 .Net Framework 4.7.1
我怎样才能访问 ISOWeek?
ISOWeek
不在 .NET Framework 中。它仅在 .NET Core 3+ 和 .NET 5+ 中可用。
我正在尝试使用 ISOWeek,但我无法在任何地方找到它。我尝试了几种不同的使用方式:
var a = System.Globalization.ISOWeek.GetWeekOfYear(DateTime.Now);
var b = ISOWeek.GetWeekOfYear(DateTime.Now);
var c = new ISOWeek();
我已经尝试添加所有我能找到的 System.Runtime 参考资料,但总是出现以下错误:
error CS0234: The type or namespace name 'ISOWeek' does not exist in the namespace 'System.Globalization' (are you missing an assembly reference?)
error CS0103: The name 'ISOWeek' does not exist in the current context
error CS0246: The type or namespace name 'ISOWeek' could not be found (are you missing a using directive or an assembly reference?)
我正在使用 .Net Framework 4.7.1
我怎样才能访问 ISOWeek?
ISOWeek
不在 .NET Framework 中。它仅在 .NET Core 3+ 和 .NET 5+ 中可用。