This point release fixes the KryptonConextMenu bug where changes are not correctly saved when you exit the editor. The bug is not obvious to begin with because it looks as if the changes have been remembered but once you run the application you notice they have not been persisted.
Archive for 2008
There is an interesting theory in software development that the quality of your software is limited to that of the second worst programmer on the team. Why the second worst and not the worst programmer?
The theory goes something like this. Everybody in the team knows who the worst programmer is. They usually stand out like a sore thumb and so everyone is carefully watching his work. But because his work is so closely monitored it is also corrected before it impacts the code base. Sure, you end up losing time but you can mitigate the problem because you are aware of it.
Now think about your own team and you will no problems deciding who the worst is. But who is the next worst? Who is the one that nobody is watching but is still checking in poor quality code? Their code spreads like a web throughout the project and so ultimately they limit the quality of the whole teams work. While you are carefully monitoring Mr. Dunce you are blissfully unaware of the time bombs being planted by his prodigy.
So take a look around your office and decide who is wearing the dunce’s hat and then decide who the runner up is. If you come to conclusion that there is no weakest player in your outfit then I have bad news. In poker they have a saying “If you don’t know who the patsy is…” and I hope I don’t need to finish the quote for you.
When you learn a new language you tend to settle into using it in a particular way. So if you missed a little known feature it is unlikely you will suddenly find it unless someone points it out. Here are 5 of my favorite C# features that you might not already be using.
1 – ?? Operator
The ?? operator is called the null-coalescing operator and is used to define a default value for a nullable value types as well as reference types. It returns the left-hand operand if it is not null; otherwise it returns the right operand. So instead of using code like this…
if (reference == null)
return _defaultInstance;
else
return reference;
You can just write the following statement instead…
return reference ?? _defaultInstance;
Much cleaner and it even works for nullable value types.
2 - DebuggerStepThrough
This attribute can be added to a method or property accessor and used to speed up debugging. When debugging and using step-into the debugger will step past the method with this attribute. This is really useful in preventing you stepping in and out of the many one liners in the code. To apply do this…
public string Name { [DebuggerStepThrough] get { return _name; } [DebuggerStepThrough] set { _name = value; } }
3 – Automatic Properties
Sick and tired of adding get/set code for simple properties? This is no longer a problem with the automatic properties added in C# 3.0. Instead of this…
private string _name; public string Name { get { return _name; } set { _name = value; } }
…just do this…
public string Name { get; set; }
4 - Object Initializers
Also introduced in C# 3.0 are object initializers. This allows you to set property values inside the new statement. Without this you either create additional overloaded constructor with the possible set of initial values or you write the long hand like this…
Employee emp = new Employee();
emp.Name = "John Smith";
emp.Age = 10;
…but this is clearer…
Employee emp = new Employee {Name="John Smith", Age=10}
5 - Constant flags
Want to specify a float instead of a double for a constant? Most people know the ‘f’ modifier after a constant number informs the compiler to make it a single float value. But did you know the full list of others flags?
100m (decimal)
100f (float)
100d (double)
100u (uint)
100l (long)
100ul (ulong)
Let me know if I have missed one you really like.
Am I the only one that is actually getting some enjoyment from watching the global financial crises?
I know I shouldn’t find it quite so fascinating but for some reason I do. Like watching a beautiful tornado just before it smacks you in the face. Just because you know it’s going to hurt doesn’t stop it looking amazing on the way in.
I’m sure I won’t find it so fascinating as I stand inline at the soup kitchen. But watching the stock market and governments panic is not an everyday sight. If the financial world is sinking like the Titanic then I might as well stand of deck and enjoy the view.
Actually I blame the The Daily Show and the The Colbert Report, they could make the end of days sound funny.
If you’re building an application using the Krypton controls then you need to add a final polish by using a set of professional icons. Otherwise all that hard work creating a nice looking app is going to waste.
To help make this process as easy as possible you can now buy a pack of 265 icons. As an introductory offer the price is just $79 during this month. Each icon has…
Three different sizes
![]()
Three different states
6 different file formats
- PNG, GIF
- ICO, PSD
- BMP (24bit & 32bit).
You can see a preview of all the icons here.