A tag for .Net-related articles
Submitted by alastairs on 22 August 2011 - 9:07pm
I've just been reading Brad Wilson's latest blog post, Interface Attributes != Class Attributes, and hit upon this interesting nugget regarding the implicit implementation of interfaces in .NET:
Implicit implementation (as seen above) is when a class implements the method/property in question as
a public method or property on the class. It's important to note that this method/property is NOT the
same thing as the interface method/property; it merely has the same signature, and thus can be used to
implicitly create the implementation of the interface. In reflection terms, the two are distinct and
different.
Hum. I did not know that.
Submitted by alastairs on 17 August 2011 - 9:01pm
I was struggling to find a way to pretty-print a JSON string in .NET. I already have the excellent Json.NET package available and after a bit of hunting, I came up with this:
It wasn't obvious how to do this, for some reason - I spent a while investigating the JsonReader and JsonWriter classes to no avail.
Hope this helps you too!
Submitted by alastairs on 5 August 2011 - 11:58pm
I spent some of this evening watching the video from Microsoft Research on their Project Roslyn, the codename for the Compiler-as-a-Service functionality they're developing for .NET vFuture.
The most interesting parts of the talk for me were:
Submitted by alastairs on 4 November 2009 - 11:58pm
Windows 7 introduces a whole bunch of cool features, as I've mentioned here previously. Sometimes the simplest ones are the most effective, however, and there's nothing simpler or more effective than the in-taskbar progress indicator. If you haven't seen this already, when you copy a file in Windows Explorer, download a file using IE, or perform any of a number of similar actions that might take a while to complete, the progress information is displayed in the task bar icon for that application.
[img_assist|nid=116|title=Windows 7 Taskbar Progress|desc=This screenshot also illustrates the "Icon and Text" display mode|link=none|align=center|width=400|height=234]
Submitted by alastairs on 24 January 2009 - 12:06am
In Java, there's only one way to explicitly cast a variable from one type to another, and that's using the bracket syntax. In .NET (well, C# anyway), there are a couple: the Java-esque bracket syntax and the as keyword. Whilst I have used both frequently in the past, a situation occurred a couple of days ago where I realised I needed to clarify what as did under the hood.
Submitted by alastairs on 8 September 2008 - 11:45pm
I recently posted a question to Stack Overflow. This is a great developer community site run by Jeff Atwood and Joel Spolsky that's currently in private beta. It's a good mixture of discussion forum, Digg-style ratings' site, and wiki that promises to become a truly invaluable resource once development is complete; it's well on its way already! The idea is that ordinary developers post questions and the community responds, with both questions and answers being voted upon by the community.
I've included my question below to gain the issue a bit of extra exposure. If you have a stackoverflow.com account, please visit my question and post a response there, or vote on the question and any existing answers. Alternatively, please leave a comment on this post with your thoughts.
Submitted by alastairs on 24 August 2008 - 4:34pm
To aid the testing of my personal finance program, I've been making heavy use of the NMock mocking framework for .NET. This is a cool utility that allows you replace actual code calls with mock code calls, factoring out a lot of complexity of setting up some tests. For example, I first started using it to mock the log4net logging framework rather than creating a new logger for each test/suite and passing that around.
Submitted by alastairs on 21 August 2008 - 6:57pm
.NET format strings rock. These are roughly equivalent to the old-school C-style sprintf() functions, with their %d, etc., symbols. There's some serious power to these strings, however; think PHP's date() function on acid, and for more than just dates.
None of this is likely to be new to all but the greenest of .NET developers (like me), but it's always worth reminding yourself of how great these things are.
[img_assist|nid=36|title=|desc=|link=node|align=none|width=400|height=407]
Submitted by alastairs on 31 July 2008 - 5:19pm
As a follow-up to my previous post on message passing in a plug-in framework, I thought I'd post my solution to the problem. Now that I've finally reached a solution, that is...!
[Note: It would be worth reading the first post to get an idea of what I was trying to do. ]
[img_assist|nid=26|title=|desc=|link=node|align=none|width=480|height=318]
Submitted by alastairs on 14 July 2008 - 12:46am
Jean-Paul Boodhoo put together a very clear and concise introduction to NAnt back in 2006. It's helped me no end converting a couple of my projects from Visual Studio Ctrl+Shift+B/MSBuild to NAnt today; I heartily recommend it as an introduction to NAnt. You can find the index to the series at http://blog.jpboodhoo.com/NAntStarterSeries.aspx.