How can I implement static methods on an interface?

You can’t define static members on an interface in C#. An interface is a contract for instances. I would recommend creating the interface as you are currently, but without the static keyword. Then create a class StaticIInterface that implements the interface and calls the static C++ methods. To do unit testing, create another class FakeIInterface, that also implements the … Read more

Visual Studio keeps crashing

You can always try some standard Visual Studio troubleshooting steps: Clean the solution Delete / rename all files in your solution created by VS, i.e. all .ncb, .suo, .user files Launch Visual Studio with all add-ins disabled: devenv.exe /SafeMode Reset All Settings: Tools -> Import / Export Settings -> Reset All Settings Delete HKCU:\Software\Micosoft\VisualStudio\9.0 and then restart Visual Studio … Read more

Run Command Prompt Commands

this is all you have to do run shell commands from C# EDIT: This is to hide the cmd window. EDIT: 2 Important is that the argument begins with /C otherwise it won’t work. How Scott Ferguson said: it “Carries out the command specified by the string and then terminates.”

What is The difference between ListBox and ListView

A ListView is basically like a ListBox (and inherits from it), but it also has a View property. This property allows you to specify a predefined way of displaying the items. The only predefined view in the BCL (Base Class Library) is GridView, but you can easily create your own. Another difference is the default selection mode: it’s Single for a ListBox, but Extended for a ListView

XmlSerializer – There was an error reflecting type

Look at the inner exception that you are getting. It will tell you which field/property it is having trouble serializing. You can exclude fields/properties from xml serialization by decorating them with the [XmlIgnore] attribute. XmlSerializer does not use the [Serializable] attribute, so I doubt that is the problem.