Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Internationalization / October 2006

Tip: Looking for answers? Try searching our database.

My.Resources DescriptionAttribute Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Giovanni - 19 Sep 2006 15:49 GMT
Hi,

    I am having a problem with the following:  When attempting to apply the
DescriptionAttribute (or any attribute) to a class property (which is later
bound to a PropertyGrid) using the following syntax, everything works
properly:

    DescriptionAttribute("Specifies the server manifest file name.")

    Since my application has to be globalized/localized, I am attempting to
do the following which retrieves the language specific string from a resource
file:

    DescriptionAttribute(My.Resources.Errors.ServerManifestFileRequired)

    I receive an error stating that it requires a constant; basically
telling me that My.Resources.Errors.ServerManifestFileRequired is not a valid
string.

    I have tried adding the .ToString, and the
Convert.ToString(My.Resources.Errors.ServerManifestFileRequired), but to no
avail.  Can anyone help me with this?

    Regards,

         Giovanni
Aldo Donetti [MS] - 12 Oct 2006 23:44 GMT
Hi Giovanni, you might want to try looking at this article
<http://msdn2.microsoft.com/en-us/library/system.componentmodel.descriptionattrib
ute.descriptionvalue.aspx
>
and use the DescriptionAttribute.DescriptionValue to set the localized value.

HTH
Aldo

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

--------------------
| Thread-Topic: My.Resources DescriptionAttribute Error
| thread-index: Acbb+r9fXpQ5mKAMTGCwoUVST+Zi2g==
[quoted text clipped - 45 lines]
|
|           Giovanni

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.