Reading the code and observing the ".cs" file extension, I guess that this is C# code, not C++ code written for Microsoft Visual C++.