PC Review


Reply
Thread Tools Rate Thread

Exception trying to retrieve from My.Resources

 
 
=?Utf-8?B?QmFycnkgR2lsYmVydA==?=
Guest
Posts: n/a
 
      13th Feb 2007
In a Property Set statement, I'm trying to retrieve a value from My.Resources
like this:

Public Property TimeEnd() As DateTime

<System.Runtime.CompilerServices.MethodImpl(Runtime.CompilerServices.MethodImplOptions.NoInlining)> _
Get
Return _timeEnd.Date
End Get

<System.Runtime.CompilerServices.MethodImpl(Runtime.CompilerServices.MethodImplOptions.NoInlining)> _
Set(ByVal value As DateTime)
CanWriteProperty(True)
If Not _timeEnd.Equals(value) Then
_timeEnd.Date = DateAdd(DateInterval.Year,
CInt(My.Resources.SqlMinYear), value.TimeOfDay)
End If
End Set

The purpose of SqlMinYear is to allow the UI to receive a time only and to
store it by appending SQL Server's min date. However, when I try to retrieve
this Resources string, I get this error:

"'My.Resources.SqlMinYear' is not declared or the module containing it is
not loaded in the debugging session."

I get the same thing if I try to get the value in the immediate window.

Any ideas?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resources: How to retrieve localized resource? Axel Dahmen Microsoft C# .NET 5 5th Dec 2007 08:02 AM
Resources: How to retrieve localized resource? Axel Dahmen Microsoft Dot NET Framework 1 3rd Dec 2007 04:56 AM
Exception trying to retrieve from My.Resources =?Utf-8?B?QmFycnkgR2lsYmVydA==?= Microsoft Dot NET Framework 1 13th Feb 2007 05:49 PM
Exception trying to retrieve from My.Resources =?Utf-8?B?QmFycnkgR2lsYmVydA==?= Microsoft Dot NET Framework 0 13th Feb 2007 05:44 PM
Trying to retrieve icon from resources.resx Carl Mercier Microsoft C# .NET 0 29th Sep 2005 05:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:51 PM.