- Not declaring your constructors as explictly public (unless of course you are programming a singleton) [minus 10 points]
- Trying to resize a text box vertically, when the multi-line property is set to false. [minus 5 points]
- Trying to click on the toolbox in Visual Studio when you're not in Design View. [minus 9 points]"
- Looking up the "Editable" property in a control when the correct property is "Read-only" (old school!) [minus 3 points]
- Using \n in a text box and expecting a newline (you need \r\n) [minus 5 points]
- Trying to pin the memory of a stack-allocated object like so: double d=5; fixed (double* ptrd = &d); you will get the error "cannot use fixed to take address of an already fixed expression". [minus 10 points - shows a fundamental lack of understanding of .NET memory management]
- Trying to create an array or vector of pinned pointers. [minus 5 points]
- Using new instead of gcnew in a Managed C++ program [minus 1 point]
- Returning null instead of NULL from Managed C++ (reversed for C#) [minus 5 points - you don't know MS C Compiler]
- Using ref to pass a reference type rather than a value type [minus 20 points]
- Trying to add a Scrollbar to a Panel (use AutoScroll property!) [minus 2 points]
- Writing a callback function as private.
From Azure Autoscaling to Next Gen Desktop Development not Forgetting Firmware on the Way
Wednesday, 15 October 2008
Classic C# Programming Offences (includes Managed C++ Gotchas)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment