diff options
Diffstat (limited to 'ElmSharp/ElmSharp/EvasKeyEventArgs.cs')
-rw-r--r-- | ElmSharp/ElmSharp/EvasKeyEventArgs.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ElmSharp/ElmSharp/EvasKeyEventArgs.cs b/ElmSharp/ElmSharp/EvasKeyEventArgs.cs index 11964a3..1ecc70b 100644 --- a/ElmSharp/ElmSharp/EvasKeyEventArgs.cs +++ b/ElmSharp/ElmSharp/EvasKeyEventArgs.cs @@ -29,11 +29,11 @@ namespace ElmSharp static public EvasKeyEventArgs Create(IntPtr data, IntPtr obj, IntPtr info) { - EvasEventKeyDown evt = (EvasEventKeyDown)Marshal.PtrToStructure(info, typeof(EvasEventKeyDown)); + var evt = Marshal.PtrToStructure<EvasEventKeyDown>(info); return new EvasKeyEventArgs() { KeyName = evt.keyname }; } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + [StructLayout(LayoutKind.Sequential)] struct EvasEventKeyDown { public string keyname; |