Skip to content

Instantly share code, notes, and snippets.

View 10sa's full-sized avatar
🤪

Kim Jae Hwan 10sa

🤪
  • Somewhere in Republic of Korea
  • 14:22 (UTC +09:00)
View GitHub Profile
@10sa
10sa / KeyValueFormatter.cs
Last active March 7, 2019 03:20
Simple KeyValuePair Serialization.
using System;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using Serializtion;
namespace Serialization.Formatter
{
/// <summary>
@10sa
10sa / BytesToClass.cs
Last active March 12, 2019 05:40
byte[] to Class (or Struct) in C#
using System.Runtime.InteropServices;
// Class
[StructLayout(LayoutKind.Sequential, Pack = 1)]
class TestModel
{
[MarshalAs(UnmanagedType.I4)]
public int value0;
[MarshalAs(UnmanagedType.I8)]