PC Review


Reply
Thread Tools Rate Thread

How to declare a local const (inside a method) using CodeDOM ?

 
 
Venkat
Guest
Posts: n/a
 
      6th Sep 2006
Hi,
Can anyone let me know how to declare a local const in a method
using CodeDOM? I am trying to get an output that looks like this:

public void SomeMethod()
{
const int MyInteger = 56;
}

One workaround is to use a CodeSnippetExpression and output the literal
"const" keyword. But that'll make it specific to C#. I prefer to keep
the output language option flexible.

Thanks in advance for your help.


-Venkat

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to declare a const byte[] Romain TAILLANDIER Microsoft Dot NET Framework 4 23rd Sep 2009 11:11 PM
How to declare a local const (inside a method) using CodeDOM ? Venkat Microsoft C# .NET 2 6th Sep 2006 03:57 PM
CodeDOM, const strings and abstract base classes Chuck Bowling Microsoft C# .NET 4 5th Oct 2004 08:39 PM
How to declare const Guid ? PawelF Microsoft C# .NET 4 6th Feb 2004 03:49 PM
how do i declare const array? George Ter-Saakov Microsoft ASP .NET 4 22nd Aug 2003 05:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:33 PM.