I'm introspecting on the code in a project using EnvDTE, and I want to be able to determine if they're a partial class, but it doesn't seem to exist in the namespace. Does anyone know how to do this?
Asked
Active
Viewed 567 times
2 Answers
3
This should help you out
if(codeClass.ClassKind == vsCMClassKind.vsCMClassKindPartialClass)
{
// It is a partial class
}

Phill Duffy
- 2,805
- 3
- 33
- 45
-
1my pleasure, there seems to only be a handful of us in this space – Phill Duffy Jul 31 '10 at 09:03
0
You can use the C# code model. Check this msdn article

Mosty Mostacho
- 42,742
- 16
- 96
- 123

BALKANGraph
- 2,031
- 1
- 15
- 16
-
? I've read that article before, but I still don't see where it says anything about determining if the class you're looking at in the code model is a partial or not. The only comment in that article about partials is in relation to how setting elements works (or doesn't) in a partial context. – Paul May 01 '10 at 13:09