The Artima Developer Community
Sponsored Link

.NET Buzz Forum
More on Extending My Namespace

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Anand M

Posts: 984
Nickname: anandm
Registered: May, 2004

Anand M is a VB.NET MVP working as a Senior Architect @ Polaris Software Lab Ltd
More on Extending My Namespace Posted: May 24, 2004 11:55 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Anand M.
Original Post: More on Extending My Namespace
Feed Title: .NET From India
Feed URL: http://www.dotnetindia.com/index.rss
Feed Description: Your daily dose of .NET From India
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Anand M
Latest Posts From .NET From India

Advertisement

In reply to my previous post on extending My namespace, PaulV had pointed out that My.Computer was really a class and not an namespace.

Joe Binder had further commented on how to extend this using partial classes. The real secret is knowing the exact class name that is used, in this case MyComputer.

I tried out what Joe had suggested and it works ok. Intellisense still seems to have a problem picking up the new stuff that I had added(this maybe due to the fact that I was using the same project to both extend and use the class), but then the compiler had no problems linking stuff up.

But I still think this is not a clean way to do this.

What I would really like is something like a config file in VB 2005, where you say something like

<My.Computer.DigitalCamera>Company.Namespace.DigitalCamera,AssemblyName </My.Computer.DigitalCamera>

And VB is able to link both of this up. The cool thing about this approach is that in VB, I get to give the developer easy access to this library via the My namespace, while for C#, I just let them use the normal assembly and namespace.

Read: More on Extending My Namespace

Topic: If you're a developer in Norway, Mercatus is hiring Previous Topic   Next Topic Topic: Best C# Bloggers

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use