473,467 Members | 1,373 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CrossReference className to file

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?
Nov 17 '05 #1
1 1195
"MAF" <mf*****@henwoodenergy.com> ha scritto nel messaggio
news:#D*************@TK2MSFTNGP09.phx.gbl...

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.

--
..Net Reporting tool: http://www.neodatatype.net
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Joshua Beall | last post by:
Hi All, I have been trying to dynamically call a static member function, as follows: $className = 'MyClass'; $methodName = 'MyMethod' $result = $className::$methodName(); However, I get a...
4
by: Ben R. | last post by:
Between ClassName and Inherits, which attribute is set to specify the class that a page uses? I would think that would be inherits. Further, the description for ClassName is: Specifies the class...
2
by: bmgz | last post by:
I have written a script that highlights a table row when the appropriate checkbox is checked. Using element.style is a bit messy and doesn't really fulfil my needs.. I want to just be able to...
3
by: d.kaufmann | last post by:
can anybody advise a crossreference tool ? i am building large projects in C90 using gnu c compiler and need to know dependencies of different modules/functions
1
by: Rene Sørensen | last post by:
I'm trying to make things alot easyer for my self, by useing a formatet error report, but i need some info to do that, like etc... MessageBox.Show( "Error In File: " + GetFileNAme() + " \n" +...
0
by: Dave Alessi | last post by:
I have a datagrid that is bound to a DataTable. I want to loop through and edit the grid which has template columns that are editable. It is necessary to crossreference the grid row, to the...
10
by: sp | last post by:
I create an xml file in a text editor: <?xml version="1.0" encoding="utf-8"?> <elts> <elt id="1" class="c1">content1</elt> <elt id="2" class="c1">content2</elt> </elts> Then I load the file...
2
by: lxmxn | last post by:
<CIM> <INSTANCE CLASSNAME="CIM_DataFile"> <PROPERTY NAME="FileSize" TYPE="uint64"> <VALUE>247296</VALUE> </PROPERTY> <PROPERTY NAME="Name" TYPE="string"> <VALUE>e:\tool\gawk.exe</VALUE>...
2
by: requeth | last post by:
I have the following XML file: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="table_classname.xsl"?> <root> <classinfo> <classname>Rhetoric 10</classname>...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.