You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
// See https://aka.ms/new-console-template for more information
|
|
|
|
|
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using ConsoleStarter;
|
|
|
|
|
using HybirdFrameworkCore.Utils;
|
|
|
|
|
|
|
|
|
|
internal class Program
|
|
|
|
|
{
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Hello, World!");
|
|
|
|
|
|
|
|
|
|
Type type = typeof(TestPerson);
|
|
|
|
|
var o = Activator.CreateInstance(type);
|
|
|
|
|
|
|
|
|
|
if (o != null)
|
|
|
|
|
{
|
|
|
|
|
TestPerson person = (TestPerson) o;
|
|
|
|
|
foreach (PropertyInfo property in person.GetType().GetProperties())
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(property.PropertyType);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UInt16 ui = 12;
|
|
|
|
|
Console.WriteLine(Convert.ToInt16(ui));
|
|
|
|
|
Console.WriteLine(BitConverter.IsLittleEndian);
|
|
|
|
|
|
|
|
|
|
string str = "€";
|
|
|
|
|
//1252 windows-1252 ANSI Latin 1; Western European (Windows)
|
|
|
|
|
var array = Encoding.Unicode.GetBytes(str);
|
|
|
|
|
foreach (byte b in array)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(b);
|
|
|
|
|
}
|
|
|
|
|
Console.WriteLine(BitUtls.BytesToHexStr(array));
|
|
|
|
|
|
|
|
|
|
var array2 = Encoding.BigEndianUnicode.GetBytes(str);
|
|
|
|
|
Console.WriteLine(BitUtls.BytesToHexStr(array2));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|