Browse by Tags

All Tags » C# (RSS)

Mapping from a type to an instance of that type

A question came up on Stack Overflow yesterday which I've had to deal with myself before now. There are times when it's helpful to have one value per type, and that value should be an instance of that type. To express it in pseudo-code, you want...

Why boxing doesn't keep me awake at nights

I'm currently reading the (generally excellent) CLR via C# , and I've recently hit the section on boxing. Why is it that authors feel they have to scaremonger about the effects boxing can have on performance? Here's a piece of code from the...
Posted by skeet | 21 comment(s)

DotNetRocks interview

Last Monday evening I had a chat with the guys from DotNetRocks , and today the show has gone live . I wouldn't claim to have said anything particularly earth-shattering, and regular readers will probably be familiar with many of the themes anyway...

Non-nullable reference types

I suspect this has been done several times before, but on my way home this evening I considered what would be needed for the reverse of nullable value types - non-nullable reference types. I've had a play with an initial implementation in MiscUtil...
Posted by skeet | 18 comment(s)

Formatting strings

A while ago I wrote an article about StringBuilder and a reader mailed me to ask about the efficiency of using String.Format instead. This reminded me of a bone I have to pick with the BCL. Whenever we make a call to String.Format , it has to parse the...
Posted by skeet | 14 comment(s)

Copenhagen talk on C# - what do you want to hear about?

I've created a Google moderator page for the C# talk I'll be giving in Copenhagen. I don't know whether there will be internet access at the event itself (for people to create and vote up/down questions during the talk) but at least as there's...
Posted by skeet | 2 comment(s)
Filed under:

Book Review: Programming C# 3.0 by Jesse Liberty and Donald Xie

Resources The O'Reilly page (errata etc) Jesse Liberty's page for his various books Buy it from Amazon or Barnes and Noble Disclaimer One reader commented that a previous book review was too full of "this is only my personal opinion"...
Posted by skeet | 8 comment(s)
Filed under: , ,

Book review: Pro LINQ - Language Integrated Query in C# 2008, by Joe Rattz

I'm trying something slightly different this time. Joe (the author) has reacted to specific points of my review, and I think it makes sense to show those reactions. I'd originally hoped to present them so that you could toggle them on or off,...
Posted by skeet | 16 comment(s)
Filed under: , ,

Logging enumeration flow

I'm currently reading Pro LINQ: Language Integrated Query in C# 2008 by Joe Rattz and yesterday I came across a claim about Enumerable.Intersect which didn't quite ring true. I consulted MSDN and the documentation is exactly the same as the book...
Posted by skeet | 12 comment(s)
Filed under: , ,

Developer Developer Developer day 7: voting now open

Every so often, Microsoft in Reading (in the UK) hosts a "Developer Developer Developer" day where members of the community present talks on all kinds of topics. There are no Microsoft speakers - it's a big community event. The next one...
Posted by skeet | with no comments
Filed under:

Data Structures and Algorithms: new free eBook available (first draft)

I've been looking at this for a while: Data Structures and Algorithms: Annotated reference with examples . It's only in "first draft" stage at the moment, but the authors would love your feedback (as would I). Somehow I've managed...
Posted by skeet | with no comments
Filed under: , ,

Core .NET refcard now available

Same drill as before - and same registration requirements (although if you registered before, you don't need to register again). The Core .NET refcard touches on some of the topics which I personally need to refer to MSDN for most often. It covers...
Posted by skeet | with no comments
Filed under:

Lessons learned from Protocol Buffers, part 4: static interfaces

Warning: During this entire post, I will use the word static to mean "relating to a type instead of an instance". This isn't a strictly accurate use but I believe it's what most developers actually think of when they hear the word. A...

Lessons learned from Protocol Buffers, part 3: generic type relationships

In part 2 of this series we saw how the message and builder interfaces were self-referential in order to allow the implementation types to be part of the API. That's one sort of relationship, but in this post we'll see how the two interfaces relate...

Lessons learned from Protocol Buffers, part 2: self-referential generic types

In the first part of this series we saw that a message type and its builder are closely related. The tricky bit comes when we want to define an interface describing messages and builders. Although some members clearly depend on the data being built (the...

Lessons learned from Protocol Buffers, part 1: messages, builders and immutability

My port of the Protocol Buffers project has proved pretty interesting. I thought I'd share some of the lessons I've learned along the way, as well as some of the frustrations at concepts I still can't express in C#. This was originally all...

Pre-Copenhagen interview

Brian Rasmussen has just posted an interview we did by email, as a sort of precursor to my talk in Copenhagen. It's nice to occasionally write down "where I am" in terms of my feelings about Java, C# and my own career. There's a bit...
Posted by skeet | with no comments
Filed under:

Speaking in Copenhagen, October 30th

I should have announced this earlier, but I'm delighted to report that on October 30th I'll be speaking at a C# event in Copenhagen. Brian Rasmussen has organised a one day seminar which basically consists of me talking about C# all day and fielding...
Posted by skeet | 2 comment(s)
Filed under:

Visual Studio 2008 SP1 and .NET 3.5 SP1 both out now

I suspect this will be pretty widely advertised fairly quickly, but both Visual Studio 2008 SP1 and .NET 3.5 SP1 are available for download. Personally I've had problems signing into the MSDN subscriptions site and going to the downloads page, but...
Posted by skeet | 2 comment(s)
Filed under:

C# refcard now available (free) from DZone

Just a quick announcement. I've been working on a C# "refcard" with DZone , and it's now available . It's free to download after registration, and covers (briefly): String escape sequences Delegate and event syntax Nullable value...
Posted by skeet | 3 comment(s)
Filed under:
More Posts Next page »