About the author

Brian Keating is a developer addicted to Microsoft Technologies.

Month List

RecentComments

Comment RSS

C# 4.0 Dynamic Keyword

clock February 25, 2010 08:39 by author Brian Keating |

"object x" is a shorthand for "System.Object x".
This declares the variable x to have the type System.Object, this is strongly typed.
And since C# provides autoboxing, you can assign anything you want to this variable.

"var x = E" declares a variable x to be of the type of the expression E.
The E is required, not optional. This is a strongly typed declaration, and you can only assign values whose type is typeof(E) to it.

"dynamic x" declares the variable x to have dynamic semantics.
This means that the C# compiler will generate code that will allow dynamic invocations on x.
The actual meaning of "x.M" is deferred until runtime and will depend on the semantics of the IDynamicObject implementation




A Custom Diagramming Library

clock December 6, 2009 06:40 by author Brian Keating |

Recently I've been working with a 3rd party diagramming library written in windows forms. It's been great and it's pretyt fast in building 80% of the applciation I'm working on.

However

I did say 80% yeah.. so, what of the other 20%, well one of the problems is that it doesn't support embedded diagrams and drill down. I can live with this for now, but in future they will become very important.
So, what to do?

Choices

  • Buy the source code for existing library
  • Write my own

Purchase

Cons..

The problem with this is an unfamiliar code base and it's probably already not the ideal architecture.
I've already replaced the node drawing with my ow GDI+ code with some custom code.
The pros..

Pros..

It got a team of dedicated developers...

 

Write

Cons..

Ain't got the foggiest how :-)

Pros..

If you're someone like me, for whom coding is more a hobby than a Job.. you'll understand..
If you're not someone like me..then.. read the blog from someone that can actuall spell Wink

Baby steps 

Lets start with something very easy..

Designer surface..

 Live demo will be here HERE

Stay tuned... "Diagramming"