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 / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

Compile warning Access of shared member will not be evaluated

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rick - 26 Jun 2007 20:46 GMT
I'm in the process of migrating from VS 2003 to VS 2005. One of the compile
warnings I am seeing is:
"Access of shared member, constant member, enum member or nested type
through an instance; qualifying expression will not be evaluated. "

Code sample:
Dim sUri As New Uri(Request.Url.AbsoluteUri.ToString)

Dim sFileUrl As String = sUri.Scheme & sUri.SchemeDelimiter & sUri.Host

Warning is on sUri.SchemeDelimiter

Is schemedelimiter obsolete now? how do I fix this without a hard coded
string of "\\"?

Can someone point me to an article that explains these compile errors?

Thanks in Advance,

Rick
Rick - 26 Jun 2007 21:16 GMT
I figured it out:
Instead of using the declared variable just use

Uri.SchemeDelimiter

> I'm in the process of migrating from VS 2003 to VS 2005. One of the
> compile warnings I am seeing is:
[quoted text clipped - 16 lines]
>
> Rick

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.