Browse by Tags

Tagged Content List
  • Blog Post: A Programmer's Guide to C# 5.0

    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.
  • Blog Post: Default parameters in C#

    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...
  • Blog Post: Benchmarking, C++, and C# Micro-optimizations

    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...
  • Blog Post: Why does C# always use callvirt? - followup

    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...
  • Blog Post: Why does C# always use callvirt?

    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...
  • Blog Post: Build a 3D XNA game from scratch - webcast series

    This came highly recommended... Build a 3D XNA game from scratch - webcast series
  • Blog Post: What data type should I use?

    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...
  • Blog Post: HealthVault Data Types - a custom data type architecture

    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...
  • Blog Post: HealthVault Data Types - Custom Data Types

    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...
  • Blog Post: xUnit.net...

    From Jim Newkirk, one of the original NUnit authors... xunit.net
  • Blog Post: Beautiful code...

    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...
  • Blog Post: Member names and UI controls

    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...
  • Blog Post: YAGNI and unit tests...

    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...
  • Blog Post: Does YAGNI ever apply to tests?

    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...
  • Blog Post: Lost Column #2: Unsafe Image Processing

    (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...
  • Blog Post: To m_ or no to m_, that is the question...

    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? :...
  • Blog Post: The problem with intellisense

    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...
  • Blog Post: App Domains and dynamic loading (the lost columns)

    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...
  • Blog Post: Unit testing support in VS Pro

    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.
  • Blog Post: Hacky way of doing changing bitmaps on a button in WPF

    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....
  • Blog Post: Visual Studio, Expression Blend, and WPF

    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. ...
  • Blog Post: MSDN Regular Expression Forum

    There's now an MSDN Regular Expression Forum
  • Blog Post: Taking snapshots of WPF animation

    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...
  • Blog Post: More on properties vs fields

    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...
  • Blog Post: Properties vs public fields redux...

    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...
Page 1 of 15 (364 items) 12345»