DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

DamienG Subscribe to this feed
DamienG
Profile Kicked Submitted Comments Tags Friends Kicked By Friends Submitted By Friends


Comments:

Be aware of the overheads and semantics of passing structs into methods, e.g.

public void SetDetails(Employee a)
{
a.Name = "Bob";
a.Age = 30;
}

Will work fine where Employee is a class but will appear to do nothing if it is a struct as they are passed by value not reference so the original object will not be changed. It also means the entire struct will be pushed onto the stack value by value not just the memory pointer which may have performance overheads especially in recursive code.

If you are going to use structs you may want to consider making the objects immutable, i.e. they never change value once instantiated but instead create new versions. This is what many of the value types (structs) in .NET already do, e.g. DateTime.Now.AddDays(1) doesn't modify Now, it creates a new instance from it.

[)amien
posted by DamienG DamienG 12 days, 12 hours ago

The reality, albeit less sensational, is at http://damieng.com/blog/2008/10/31/linq-to-sql-next-steps

[)amien
posted by DamienG DamienG 22 days, 9 hours ago

The country list there is out of date - it doesn't even include the Channel Islands that were added in 2006.

Just go to the master source for this information and bypass all the adverts on this site - http://www.iso.org/iso/country_codes/iso_3166_code_lists.htm

[)amien
posted by DamienG DamienG 2 months, 19 days ago

Any particular reason why the word "beta" was removed from the title and summary posted here?

[)amien
posted by DamienG DamienG 5 months, 13 days ago

Or interest even ;-)
posted by DamienG DamienG 5 months, 25 days ago

And this is of internet to .NET programmers how?

[)amien
posted by DamienG DamienG 5 months, 25 days ago

There is no bold or italic version of Monaco. If you are using it on Windows what you are seeing is Windows coming up with it's own faux bold and italic versions - neither of which will honour the original metrics of the regular font and thus ruin the monospaced nature preventing you from mixing regular and bold in your IDE.

As an example open Wordpad and type ABCDEFG| on one line then copy and paste it to two more, change the font to Monaco and make the second line bold and the third line "italic". You will see they no longer line up.

[)amien
posted by DamienG DamienG 5 months, 25 days ago

Oh and the fact Monaco doesn't give you bold or italics.

[)amien
posted by DamienG DamienG 5 months, 26 days ago

Monaco looks great on the Mac but it's patchy on Windows... an let's not get into the dubious grey area of installing an Apple copyrighted font on Windows.

[)amien
posted by DamienG DamienG 5 months, 26 days ago

Short answer: No.
posted by DamienG DamienG 5 months, 30 days ago

Only JailBroken/hacked iPhones - forget everything else unless Apple changes the terms and conditions of the SDK to allow interpreted/extendable code which any runtime would need (which is why no Java or Flash).

[)amien
posted by DamienG DamienG 7 months, 13 days ago

Probably because if people wanted a generally-useful or interesting news system they'd go to Slashdot, Digg etc.

[)amien
posted by DamienG DamienG 7 months, 17 days ago

The built-in HtmlTable class in System.Web.HtmlControls can be used in a similar way.

[)amien
posted by DamienG DamienG 7 months, 27 days ago

This has got what to do with .NET ?

[)amien
posted by DamienG DamienG 8 months ago

While it is a bit of fun it does demonstrate the flexibility of the AdjectiveNounVerb class naming format.

[)amien
posted by DamienG DamienG 8 months, 5 days ago

Arg, doesn't DNK handle <a> tags yet!!

This is a known problem with this pattern and GC based systems under the name http://damieng.com/blog/2005/01/19/lapsedlistenersmemoryleaksinsubscriberpublisherscenarios lapsed listeners.

You can't always remove from the event mechanism if the objects are managed elsewhere and it doesn't provide a facility to do so - e.g. TreeView control.

Thankfully .NET 3.5 has a http://msdn2.microsoft.com/en-us/library/system.windows.weakeventmanager.aspx WeakEventManager class that can provide event services without this problem by keeping weak references to the listeners.

[)amien
posted by DamienG DamienG 8 months, 6 days ago
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge