CommonMessurementUnits
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
namespace CommonConsole
|
||||
{
|
||||
using CommonMessurementUnits;
|
||||
|
||||
using System;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
|
||||
int x = 3;
|
||||
byte[] xb = x.GetBytes();
|
||||
Console.WriteLine(string.Join("", xb.GetBits()));
|
||||
Console.WriteLine(xb.ToHex());
|
||||
long y = BitConverter.ToInt32(xb, 0);
|
||||
Console.WriteLine(y);
|
||||
|
||||
//var model = new TestClass
|
||||
//{
|
||||
// Flow = 1,
|
||||
// Time = 15.56,
|
||||
// Volume = 40,
|
||||
// Pressure = 250000,
|
||||
// Current = 130,
|
||||
// Temperature = 21.9
|
||||
//};
|
||||
|
||||
//var modelJson = JsonConvert.SerializeObject(model, Formatting.Indented);
|
||||
//var testModel = JsonConvert.DeserializeObject<TestClass>(modelJson);
|
||||
|
||||
//Console.WriteLine(modelJson);
|
||||
//Console.WriteLine(JsonConvert.SerializeObject(testModel, Formatting.Indented));
|
||||
}
|
||||
}
|
||||
|
||||
public class TestClass
|
||||
{
|
||||
public Current Current { get; set; }
|
||||
|
||||
public Flow Flow { get; set; }
|
||||
|
||||
public Pressure Pressure { get; set; }
|
||||
|
||||
public Temperature Temperature { get; set; }
|
||||
|
||||
public Time Time { get; set; }
|
||||
|
||||
public Volume Volume { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user