Sign in
Eric Gunnerson's Compendium
Tags
Agile
Avalon
Books
Column
CrackedRib
CSharp
Cycling
electronics
Friends
Fun
HealthVault
Humorish
Language
Pages
Photography
Program Manager
Programming
Regex 101
Review
Tutorial
Vista
What's Wrong With This Code
Windows DVD Maker
Windows Movie Maker
WPF
XNA
Browse by Tags
MSDN Blogs
>
Eric Gunnerson's Compendium
>
All Tags
>
csharp
Tagged Content List
Blog Post:
A Programmer's Guide to C# 5.0
Eric Gunnerson
My author's copies of the Fourth Edition of my book showed up today: It is significantly updated from the previous version. I especially enjoyed writing the sections on Linq and asynchronous features.
on
20 Nov 2012
Blog Post:
Default parameters in C#
Eric Gunnerson
From an internal discussion we're having on the advisability of using default parameters in C#: Currently, the pain and limitation of doing overloads forces you to rethink how a method should work. Consider the following: Process(int a); Process(int a, float b); Process(int a, float b, string...
on
23 Feb 2011
Blog Post:
Benchmarking, C++, and C# Micro-optimizations
Eric Gunnerson
Two posts ( 1 2 ) on C# loop optimization got me thinking recently. Thinking about what I did when I first joined Microsoft. Way back in the spring of 1995 or so (yes, we did have computers back then, but the Internet of the time really *was* just a series of tubes), I was on the C++ compiler test team...
on
1 Dec 2008
Blog Post:
Why does C# always use callvirt? - followup
Eric Gunnerson
I was responding in comments, but it doesn't allow me to use links, so here's the long version: Judah, Yes, marking everything as virtual would have little performance impact. It would, however, be a Bad Thing . It's #3 on my list of deadly sins... ShayEr, cmp [exc], exc is the solution to...
on
7 Jul 2008
Blog Post:
Why does C# always use callvirt?
Eric Gunnerson
This question came up on an internal C# alias, and I thought the answer would be of general interest. That's assuming that the answer is correct - it's been quite a while. The .NET IL language provides both a call and callvirt instruction, with the callvirt being used to call virtual functions. But...
on
2 Jul 2008
Blog Post:
Build a 3D XNA game from scratch - webcast series
Eric Gunnerson
This came highly recommended... Build a 3D XNA game from scratch - webcast series
on
6 Feb 2008
Blog Post:
What data type should I use?
Eric Gunnerson
In my previous posts, I kindof glossed over the different kinds of data types you might have in your application and when you might choose a specific type. I now seek to rectify that oversight, but first I need to talk about types in a more general sense: Eric's Taxonomy of HealthVault data types...
on
30 Oct 2007
Blog Post:
HealthVault Data Types - a custom data type architecture
Eric Gunnerson
In my last post, I showed how to create custom data types, but there's an obvious problem with that approach. There's only one of them. That means that when you do a query for your custom type, you get all the custom types that meet your filter. If your application creates multiple custom types...
on
29 Oct 2007
Blog Post:
HealthVault Data Types - Custom Data Types
Eric Gunnerson
So, you're using the SDK, and it turns out that you need to store some data, and there isn't a built-in type that stores what you need. What do you do? The SDK provides a way for you to create your own custom type. There's an important limitation to this technique that I'll touch on later, so make...
on
29 Oct 2007
Blog Post:
xUnit.net...
Eric Gunnerson
From Jim Newkirk, one of the original NUnit authors... xunit.net
on
24 Sep 2007
Blog Post:
Beautiful code...
Eric Gunnerson
O'reilly publishes Beautiful Code Jonathan Edwards counters with a beautiful explanation . Now, I haven't read the new book, but I have a strong resonance with what Edwards wrote. You should definitely read the whole thing, but I few sentences jumped out at me. A lesson I have learned the hard...
on
14 Aug 2007
Blog Post:
Member names and UI controls
Eric Gunnerson
A follow-on to the previous discussion about member names. There were a variety of opinions, some of which argued for using no prefix at all. For those of you who are in the group, I'm interested in how you manage things when you are doing UI work, and having to deal with your 3 member variables...
on
2 Jul 2007
Blog Post:
YAGNI and unit tests...
Eric Gunnerson
Thanks for your comments. I decided to go ahead and write the unit tests for that layer, both because I knew what not writing them would be like, and I wanted to play with wrapping/mocking a system service. I also decided - as some of you commented - to do the right thing and encapsulate it into...
on
28 Jun 2007
Blog Post:
Does YAGNI ever apply to tests?
Eric Gunnerson
I've been writing a small utility to help us do some configuration setup for testing. It needs to walk a directory structure, find all instances of a specific xml file, and then make some modifications to the file. I TDD'd the class that does the XML file stuff, and I'm confident that it's working...
on
27 Jun 2007
Blog Post:
Lost Column #2: Unsafe Image Processing
Eric Gunnerson
(circa November 15, 2001) I think this column stands up pretty well without caveat. I should note that I wrapped the image class to provide nicer pixel-based access in a class you can find here . I suggest basing your code on that rather than what I wrote in the column. I should also note that...
on
20 Jun 2007
Blog Post:
To m_ or no to m_, that is the question...
Eric Gunnerson
I apologize for shocking your system by posting more than once a month - there are reasons for that, but I unfortunately can't get into them right now - but Keith added an interesting comment to my last post. He said: Side Note: a bit disturbing you're using C++ naming conventions in C# though? :...
on
15 Jun 2007
Blog Post:
The problem with intellisense
Eric Gunnerson
Today I was working with some sample code, and I came across a misspelling. Not a big deal - there was a field that was named "m_postion" rather than "m_position". But that got me thinking... In the past, that sort of thing wouldn't have happened. You would have written: int m_postion; but...
on
15 Jun 2007
Blog Post:
App Domains and dynamic loading (the lost columns)
Eric Gunnerson
As promised, I'm going to start republishing some of my columns that were eaten by MSDN. I spent some time reading this one and deciding whether I would re-write it so that it was, like, correct. But it became clear that I didn't have a lot of enthusiasm towards that, so I've decided to post it...
on
6 Jun 2007
Blog Post:
Unit testing support in VS Pro
Eric Gunnerson
I'm at least a month late in linking to this, but if you've been paying very little attention it might still be new that VS Pro will support unit testing in Orcas. Which I think is great news.
on
4 May 2007
Blog Post:
Hacky way of doing changing bitmaps on a button in WPF
Eric Gunnerson
I came up with a hacky way of doing "hover" and "press" buttons in WPF recently. There are a couple of nice examples on the web, but I was looking for a way to do it purely through XAML. If there's a nicer way to do it through XAML (or if there are big drawbacks to this approach) please let me know....
on
11 Apr 2007
Blog Post:
Visual Studio, Expression Blend, and WPF
Eric Gunnerson
I've been doing a bit of prototyping work with the aforementioned products, and thought that since Blend has an RC1 release , it was a good time to share a few thoughts... The short story is that both VS and blend are pretty good tools for building in WPF, but together, they're very impressive. ...
on
23 Mar 2007
Blog Post:
MSDN Regular Expression Forum
Eric Gunnerson
There's now an MSDN Regular Expression Forum
on
1 Mar 2007
Blog Post:
Taking snapshots of WPF animation
Eric Gunnerson
I've been playing around with WPF animation, and ended up wanting to take a snapshot of an animation at a specific place. Specifically, I have a canvas that has some pictures on it that are moving, and I want to be able to save a bitmap of what it looks like at a specific time. Getting the bitmap...
on
27 Feb 2007
Blog Post:
More on properties vs fields
Eric Gunnerson
Some nice comments on what I wrote . First, a non-controversial question. Robin asked whether you would capitalize them in that case, and I think you should, as having something accessed externally that isn't properly cased will be surprising to people. Dani - and others - have pointed out that...
on
2 Feb 2007
Blog Post:
Properties vs public fields redux...
Eric Gunnerson
My blog reader burped recently, and gave forth a post (and reply ) than Rico wrote last September, but since I didn't comment on it then, I'll comment on it now. And, yes, I've written about this in the past... Basically, this revolves around the question of using properties, or using public fields...
on
1 Feb 2007
Page 1 of 15 (364 items)
1
2
3
4
5
»