CodeDom: How can i make a CodeTypeReference point to a CodeTypeDeclaration?

A

Avi Fomberg

This is what i m trying to do:

//Create class
CodeTypeDeclaration cls = new CodeTypeDeclaration("MyClass");

//Create method
CodeMemberMethod method = new CodeMemberMethod();
method.Name = "MyFunc";
method.Attributes = MemberAttributes.Static | MemberAttributes.Public;

And This is where i get stuck:
==============================
methodViewGetter.ReturnType = new CodeTypeReference(-->cls<---);

How can i make this wokr?

Thanks in advance, Avi.
 

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