Bug Vanquisher

13 September 2009

CodeDom Fun

Filed under: Dev inside! — Tanveer Badar @ 5:52 PM

Writing CodeDom statements by hand is no fun. Visual studio team members who wrote the code to generate data sets must be the finest. For example, guess what would be the output of this statement:

constructor.Statements.Add( new CodeAssignStatement( new CodeFieldReferenceExpression( new CodeThisReferenceExpression( ) , "table" + row [ "TABLE_NAME" ] ) , new CodeCastExpression( row [ "TABLE_NAME" ].ToString( ) + "DataTable" , new CodeFieldReferenceExpression( new CodeThisReferenceExpression( ) , "Table" ) ) ) );

Just something like

this.tableDT = ( DTDataTable ) (this.Table );

Side note:

I am back!

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: