CrossReference className to file

  • Thread starter Thread starter MAF
  • Start date Start date
M

MAF

How can I cross reference a class name to a file name. I am using
reflections and parsing the project xml file to build a list of all items
that have resource files associated with them. One thing that I have found
is if the file name is different than the class name I have a problem trying
to link the two items.

Here is the example

If I have a file myclass1.cs and it contains a class myclass the reflection
will return myclass when I use the gettypes method but there is no way for
me to tell that myclass belongs to myclass1.

Any ideas?
 
"MAF" <[email protected]> ha scritto nel messaggio

Here is the example

If I have a file myclass1.cs and it contains a class myclass the reflection
will return myclass when I use the gettypes method but there is no way for
me to tell that myclass belongs to myclass1.

Any ideas?

Since there is no relation between source files and class names you need to
post some code.

A class belong to a namespace (that belong to an assembly) not to a .cs
file.
 
Back
Top