CodeDom -- create virtual method

M

Mark

Using the CodeDom namespace, how to do you specify that a generated method
should be virtual?

CodeMemberMethod method = new CodeMemberMethod();
method.Name = "MyMethod";
method.Attributes = MemberAttributes.???????;

Thanks in advance.

Mark
 
M

Mohamoss

Hi Mark
That really depends on the logic of your application or your code. Is this
function most likely overridable . can an object use this function or it
needs to be future developed in an overload. you can alwasy use your name
conventions to knoe that is is a virtual function like member attributes
".... virtual!" hope this helps , you might also look at this good sample
using codedom
http://www.thecodeproject.com/csharp/matheval.asp
Hope this helps
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top