By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,854 Members | 2,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,854 IT Pros & Developers. It's quick & easy.

Change property name of existing class

P: n/a
Joe
Is there anyway to change the name or add a property to and existing class
in .NET 1.1?

For example if I have a property called Name and I want to change it to
MyName.

-Joe
Aug 14 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi Joe,

It depends on whether you have the source code of this assembly.

If yes, just change the property name in the code and re-build it. If no,
we cannot change any property name at runtime. If you really need to change
the name of a property, you can make a sub class from this class, and
change the name of certain property in the derived class.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Aug 14 '06 #2

P: n/a
Joe
Sorry I should have explained it better. I would like to change the name at
runtime but I guess it cannot be done.
"Kevin Yu [MSFT]" <v-****@online.microsoft.comwrote in message
news:5H**************@TK2MSFTNGXA01.phx.gbl...
Hi Joe,

It depends on whether you have the source code of this assembly.

If yes, just change the property name in the code and re-build it. If no,
we cannot change any property name at runtime. If you really need to
change
the name of a property, you can make a sub class from this class, and
change the name of certain property in the derived class.

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Aug 14 '06 #3

P: n/a
Hi ,

"Joe" <jb*******@noemail.noemailwrote in message
news:O$**************@TK2MSFTNGP02.phx.gbl...
Sorry I should have explained it better. I would like to change the name
at runtime but I guess it cannot be done.
Out of curiosity, why you want to do this?

--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Aug 14 '06 #4

P: n/a
Yes, this cannot be done.

Kevin Yu
Microsoft Online Community Support
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Aug 15 '06 #5

P: n/a
"Joe" <jb*******@noemail.noemaila écrit dans le message de news:
uv**************@TK2MSFTNGP04.phx.gbl...

| Is there anyway to change the name or add a property to and existing class
| in .NET 1.1?
|
| For example if I have a property called Name and I want to change it to
| MyName.

You can't change anything about an existing class without recompiling the
original class.

You can, however, derive from a class and add another property to reflect
the new name, but the original property will also be available.

Joanna

--
Joanna Carter [TeamB]
Consultant Software Engineer
Aug 23 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.