Loading...
DotNetKicks.com
.NET links, community driven
login
register
submit a story
upcoming stories
about
blog
Why not
join our community?
, there are
9 users online
home
users
DamienG
comments
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
DamienG
Profile
Kicked
Submitted
Comments
Tags
Friends
Kicked By Friends
Submitted By Friends
Comments:
C# Structs
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
12 days, 12 hours ago
LINQ To SQL is Dead - Read Between the Lines
The reality, albeit less sensational, is at
http://damieng.com/blog/2008/10/31/linq-to-sql-next-steps
[)amien
posted by
DamienG
22 days, 9 hours ago
List of countries, cities, languages
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
2 months, 19 days ago
Visual Studio 2008 SP1 Br0ke my LINQ-to-SQL
Any particular reason why the word "beta" was removed from the title and summary posted here?
[)amien
posted by
DamienG
5 months, 13 days ago
iPod Ad Generator
Or interest even ;-)
posted by
DamienG
5 months, 25 days ago
iPod Ad Generator
And this is of internet to .NET programmers how?
[)amien
posted by
DamienG
5 months, 25 days ago
A good coding font makes a difference. Envy Code R, better than ever!
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
5 months, 25 days ago
A good coding font makes a difference. Envy Code R, better than ever!
Oh and the fact Monaco doesn't give you bold or italics.
[)amien
posted by
DamienG
5 months, 26 days ago
A good coding font makes a difference. Envy Code R, better than ever!
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
5 months, 26 days ago
Is the ADO.NET Team Abandoning LINQ to SQL?
Short answer: No.
posted by
DamienG
5 months, 30 days ago
Is It Possible? .NET Applications for iPhone?
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
7 months, 13 days ago
How to Rename Multiple Files At Once
Probably because if people wanted a generally-useful or interesting news system they'd go to Slashdot, Digg etc.
[)amien
posted by
DamienG
7 months, 17 days ago
C# html table builder
The built-in HtmlTable class in System.Web.HtmlControls can be used in a similar way.
[)amien
posted by
DamienG
7 months, 27 days ago
All latest and most popular local and world news at one place
This has got what to do with .NET ?
[)amien
posted by
DamienG
8 months ago
Can't think of a good class name?
While it is a bit of fun it does demonstrate the flexibility of the AdjectiveNounVerb class naming format.
[)amien
posted by
DamienG
8 months, 5 days ago
A .NET memory leak you did not think about
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
8 months, 6 days ago
« Previous
1
2
3
Next »
Sponsored Link:
www.carlist.ie
Search:
Ads via The Lounge
DotNetKicks is an open source project from
Incremental Systems