The Best Way to Work with Units in .NET

preview_player
Показать описание


Hello, everybody. I'm Nick, and in this video, I will show you the best way to work with units of measurement in C# and .NET.

Don't forget to comment, like and subscribe :)

Social Media:

#csharp #dotnet
Рекомендации по теме
Комментарии
Автор

Thank you Nick, finally with this package I can convert celsius in liters and meters

Kingside
Автор

Thanks for the shoutout Nick, I'm glad you found it useful 😊

angularsen
Автор

About ten years ago, I tried to write a library that did this. I'm glad somebody was able to figure it out.

AmateurSpecialist
Автор

I've been using this library for years. Even contributed to it a little. An amazing work.

EtienneFortin
Автор

Using this library in a production system. It is great that it can be so “smart” doing the conversions. The downside of this is that in cases when its “smarts” are not good enough, the resulting mismatches can be hard to understand and chase down. Pros and cons—more pros than cons.

sergeynosov
Автор

Awesome. I'm going to give this a shot. We have lengths stored in nanometers in Influx because they don't have decimals (only long and float) and we need the accuracy. As a result I need to convert twice potentially: first to SI units and then to whatever the client wants: Metric or Hands and feet (US).

padonker
Автор

Some years ago I had the need for a thing like this, but in a C++ project.

Sergio_Loureiro
Автор

I wish I knew this in my previous job for managing the warehouse madness but great to know nonetheless

JohnKerrashVirgo
Автор

One of the best packages. I actually added some units that were missing for my use cases. Good developers 🎉

joga_bonito_aro
Автор

I've been using this since starting on my current project 4 years ago; it was already in use when I started. Really like it overall. One thing that makes no sense to me is a recent upgrade had a breaking change to equality checking related to units of measurement. E.g. it used to be that 1000 milliliters compared to 1 liter was true. It's now false because the units of measurement are different. If you have milliliters and you want to compare it to liters you have to convert the units to match first. That just seems crazy to me. IMO, that's what the library should be doing for me, like it used to.

HarleyPebley
Автор

Hands - finally the horse/equine folks are catered for.

IanGratton
Автор

Nice that the author also has a typescript version based on the same unit definition files

kabal
Автор

Do they make it easy to add your own units?

giszTube
Автор

Does not support football fields or olympic-size swimming pools. Completely unusuable.

FroodyBanana
Автор

Thanks to your great contents, i would be great to have course about how to write SQL query on Dometrain

regestea
Автор

awesome.
It's very common you'd have to convert units.
Better focus on the app logic rather than on physics.

Fred-yqfs
Автор

This library would have been useful when I was working with the Office Open XML format, which uses obscure typography units like emus and twips 😂

MajeureX
Автор

Does it have Planck length though? Or Astronomical Unit?

bigice
Автор

Great library for sure however when I evaluated it for my production engineering code it was consistently 3x slower than my basic handrolled value types with operator overloads. Basic unit types are very easy to write yourself and you will have full control over features you include

argensardefs
Автор

Initially thought this video is about Delphi Units.

UweKeim