We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/angularsen/UnitsNet
The text was updated successfully, but these errors were encountered:
UnitsNet 是 C# 中处理各种物理单位的库,比如以长度为例,有 米, 英尺, 海里 等等。通常我们需要查阅相关的资料来了解他们之间的转换关系,过程非常繁琐。但是 UnitsNet 库解决了我们的痛点,这样就不用在复杂的转换中引入错误。
C#
米
英尺
海里
UnitsNet
using UnitsNet; Length length = Length.FromMeters(1); Console.WriteLine(length); Length length1 = new Length(2, UnitsNet.Units.LengthUnit.Meter); System.Console.WriteLine($"cm: {length.Centimeters}"); System.Console.WriteLine($"m: {length.Meters}"); System.Console.WriteLine($"km: {length.Kilometers}"); System.Console.WriteLine($"in: {length.Inches}"); System.Console.WriteLine($"ft: {length.Feet}"); System.Console.WriteLine($"yd: {length.Yards}"); System.Console.WriteLine($"mi: {length.Miles}"); System.Console.WriteLine($"nmi: {length.NauticalMiles}");
1 m cm: 100 m: 1 km: 0.001 in: 39.37007874015748 ft: 3.280839895013123 yd: 1.0936132983377078 mi: 0.0006213711922373339 nmi: 0.0005399568034557236
Sorry, something went wrong.
No branches or pull requests
https://github.com/angularsen/UnitsNet
The text was updated successfully, but these errors were encountered: