1

I'm working on my own vspackage. I can add variables to my class by using AddVariable.

The "cl" is a class named "TestPage", and following code insert "TestPage mTestVariable" to my class.

CodeClass cl = element as CodeClass;
cl.AddVariable("mTestVariable", cl, 0, EnvDTE.vsCMAccess.vsCMAccessPrivate);

Now I want to insert a pointer to my class, like this:

TestPage* mTestVariable;

How should I do?

Yonghui
  • 222
  • 3
  • 16

1 Answers1

1

I can just add variable named "*mTestVariable".

Like this:

cl.AddVariable("*mTestVariable", cl, 0, EnvDTE.vsCMAccess.vsCMAccessPrivate);
Yonghui
  • 222
  • 3
  • 16