CodeDom -- create virtual method

  • Thread starter Thread starter Mark
  • Start date Start date
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
 
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
 
Back
Top