Bug Vanquisher

13 September 2009

is This Beautiful?

Filed under: Dev inside!, Rant vs Vent — Tanveer Badar @ 10:01 PM

CodeTypeDeclaration tablerow = new CodeTypeDeclaration
{
    IsClass = true ,
    Name = ( row [ "TABLE_NAME" ] + "Row" ) ,
    IsPartial = true ,
    BaseTypes = { datarowref } ,
    Members =
    {
        new CodeMemberField( ( row [ "TABLE_NAME" ].ToString( ) + "DataTable" ) , "table" + row [ "TABLE_NAME" ] ),
        new CodeConstructor
        {
            Attributes = MemberAttributes.Public ,
            Parameters = { parameter } ,
            BaseConstructorArgs = { buildervar } ,
            Statements =
            {
                new CodeAssignStatement( new CodeFieldReferenceExpression( thisref , "table" + row [ "TABLE_NAME" ] ) , new CodeCastExpression( row [ "TABLE_NAME" ].ToString( ) + "DataTable" , tablefield ) )
            }
        }
    }
};

To some, it may be but for me it is nauseating. What happened to all those .Add and .Insert calls?

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

Create a free website or blog at WordPress.com.

%d bloggers like this: