#define

#define isn't used in C# (well it is sort of, see below, but the general usage isn't available) You can't use it to create macros. Bloody annoying, but get over it – you can't!  So instead use constants. See constants here #if DEBUG See here. How #define is used in C# #define is only used to […]

Read More

References

Add project references (e.g. .NET, COM etc plug ins) by right clicking References in Solution Explorer

Read More

Platform Target

A classic source of run problems in C# can be if your using components that are 32bit in an application with the Platform.  Setting the Platform Target to x86 will often solve this whilst still allowing the app to run on an x64 platform. Menu > Project > Project Properties > Build > Platform Target

Read More

Creating A Windows Forms Project From scratch

This is our internal check list to create a new Windows Forms Project… Create a ‘Visual C#’ > 'Windows' > ‘Windows Forms Application’. Once created:- Re-name the created form to frmMain.h by right clicking it in the solution explorer and selecting 'Rename'  Click Yes to updating all references. Things To Add To The Default Form […]

Read More

C# for C++ programmers

Good Resources C# FAQ for C++ programmers Some Key Differences Classes and structs Classes and structs are almost the same in C++ – this is not true for C#.  In C#, structs are value types (instances stored directly on the stack, or inline within heap-based objects), whereas classes are reference types (instances stored on the […]

Read More