-
The other day I had a talk to give which included a little around Windows 7 shell programming in .NET 4.0 Beta 2 and I hadn’t really looked at it so I took a few mins out to take a look at how you can program the Taskbar in Windows 7 from WPF in Visual Studio 2010 Beta 2. I was really looking for a short...
-
Just a quick plug – tomorrow evening I’m doing a session on ADO.NET Data Services (“Astoria”) at the SQL Server User’s Group at Microsoft, Reading. See here for details; http://sqlserverfaq.com/events/167/Sessions-on-Understanding-ADONET-Data-Services-Windows-7-features-indepth-and-the-usual-SQL-Nuggets...
-
If I’ve written code around PropertyChanged notification in Visual Studio once then I must have done it thousands of times so I thought I’d do a quick snippet and drop it here. Snippet for a class that implements INotifyPropertyChanged; <?xml version="1.0" encoding="utf-8" ?>...
-
I talked a little at DevWeek about C# 4 and Visual Basic 10 and, in the C# section of that talk, I talked about optional parameters and named parameters coming into the language. I presented an example class something like this one; class P e r s o n { public void W a l k ( ) { W a l k ( 1 ) ; } public...
-
I did a couple of sessions at DevWeek this week and had a really good time meeting up with various folks and chatting about technologies. My sessions were on; VB and C# in Visual Studio 2010 Parallel Extensions in Visual Studio 2010 Silverlight and HTML/Javascript interoperability (in Silverlight 2)...
-
NB: This comes from experimentation rather than being some kind of C# guru so apply a pinch of salt to anything and everything and I’ll correct if someone tells me I messed up :-) I’m also not sure I can add a lot around this dynamic feature in C# 4 but I’ve been thinking about some demos around it today...
-
Another experiment with C# 4 and the “dynamic type”. I was playing with this code below and wasn’t 100% sure what’d happen at the point where we hit the 2 lines that I’ve flagged with a * below. That is – if I’m doing dynamic method resolution and I pass a “dynamic parameter” then are they treated as...
-
I’ve been thinking a little this week about C# 4.0, VB 10 and the new dynamic abilities. That is, what happens when I do something like; static void M a i n ( string [ ] a r g s ) { d y n a m i c o = G e t S o m e O b j e c t ( ) ; o . A d d ( 1 0 1 ) ; } static object G e t S o m e O b j e c t ( ) ...
-
A big thanks to all the people who came along to my talk on Parallel Extensions at the NxtGen User Group in Coventry last night. The slides that were used should be visible up on SlideShare if you want them for any reason. Note to self: “Coventry is not ‘right next to Birmingham’ and is actually 100...
-
Blogging this in order that I remember in the future that I have been around this “loop” many times and that this code; int x = 1; Action a = new Action( ( ) => { x++; }); a( ); Console.WriteLine( x ); prints a value of 2 whereas this code; int x = 1; Action< int > a = new Action< int >...
-
I'm just back from REMIX UK down in Brighton where I did a couple of sessions - one on Silverlight and another on Windows Presentation Foundation. Thanks to all who came along and apologies if you were either chatting to me or in my session and thought that I was a little low on energy ( or coherence...
-
Mike was chatting to me about how you'd take something like this ( against LINQ to SQL and the Northwind database ); using (NorthwindDataContext ctx = new NorthwindDataContext() { Log = Console.Out }) { string [] values = { "A" , "B" , "C" }; var query = from c in ctx.Customers select c; foreach ( string...
-
I miss default parameter values from C++. In C# if I have some method Foo; static void Foo( int intValue, float floatValue, string stringValue) { } and there's the possibility that all the parameters can be "optional" then I end up writing something like; static void Foo() { Foo(0, 0.0f, null ); } static...
-
Mats has a post over here about concurrency in LINQ to SQL with a long write-up about issues that he sees in using the framework. I've not read all of it yet because the very first point that he raises sent me off on a bit of a tangent (which does not necessarily provide an answer to any/all of his post...
-
Short video on working with the new varbinary (max) filestream data type in SQL Server 2008. Hover near the bottom of the player for controls. Double-Click the player for full-screen. I don't have a downloadable version at the time of writing so will update the post later when I have one. The post...