Posts

Showing posts from December, 2016

using assembly binding for conflict version assembly

      <dependentAssembly>         <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />         <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />       </dependentAssembly>

Get Computer information

public static class PerformanceInfo     {         [DllImport("psapi.dll", SetLastError = true)]         [return: MarshalAs(UnmanagedType.Bool)]         public static extern bool GetPerformanceInfo([Out] out PerformanceInformation PerformanceInformation, [In] int Size);         [StructLayout(LayoutKind.Sequential)]         public struct PerformanceInformation         {             public int Size;             public IntPtr CommitTotal;             public IntPtr CommitLimit;             public IntPtr CommitPeak;             public IntPtr PhysicalTotal;             public IntPtr PhysicalAvailable;             public IntPtr SystemCache; ...