PC Review


Reply
Thread Tools Rate Thread

2 objects with same name

 
 
=?Utf-8?B?V2lsZnJpZWQgTWVzdGRhZ2g=?=
Guest
Posts: n/a
 
      9th Feb 2005
Hi,

I have a System.Windows.Forms.Application and a MapPoint.Application. How
tell the compiler that if I type: Application, that I mean
System.Windows.Forms.Application ?

Of course I can declare a var for it but I wonder if there are other ways ?

--
rgds, Wilfried
http://www.mestdagh.biz
 
Reply With Quote
 
 
 
 
Mattias Sjögren
Guest
Posts: n/a
 
      9th Feb 2005
>I have a System.Windows.Forms.Application and a MapPoint.Application. How
>tell the compiler that if I type: Application, that I mean
>System.Windows.Forms.Application ?


Include

using System.Windows.Forms;

and remove any

using MapPoint;

statements from the file.




Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
 
Reply With Quote
 
=?Utf-8?B?cm9ia2l0?=
Guest
Posts: n/a
 
      9th Feb 2005
There are two ways as far as I know.

1. You can have 'using' directive for one of the namespaces and use fully
qualified names for the other.

2. You can shorten the name space path like that:

I think that syntax is as follows:

using Windows.Forms WF;
using MapPoint;

then you can refer to MapPoint:

Application app1;

and to Windows.Forms:

WF.Application app2;




"Wilfried Mestdagh" wrote:

> Hi,
>
> I have a System.Windows.Forms.Application and a MapPoint.Application. How
> tell the compiler that if I type: Application, that I mean
> System.Windows.Forms.Application ?
>
> Of course I can declare a var for it but I wonder if there are other ways ?
>
> --
> rgds, Wilfried
> http://www.mestdagh.biz

 
Reply With Quote
 
=?Utf-8?B?V2lsZnJpZWQgTWVzdGRhZ2g=?=
Guest
Posts: n/a
 
      9th Feb 2005
> using Windows.Forms WF;

unfortionally this dont works in my IDE. I'm using C#2005 beta, so probably
the reason Other ways ? (precide typing the whole namespace for one of
the 2)
 
Reply With Quote
 
cody
Guest
Posts: n/a
 
      9th Feb 2005
> > using Windows.Forms WF;
>
> unfortionally this dont works in my IDE. I'm using C#2005 beta, so

probably
> the reason Other ways ? (precide typing the whole namespace for one

of
> the 2)


no the correct syntax is

using WF = System.Windows.Forms;

thats why is didn't work for you.


 
Reply With Quote
 
=?Utf-8?B?V2lsZnJpZWQgTWVzdGRhZ2g=?=
Guest
Posts: n/a
 
      9th Feb 2005
yes this works thanks

"cody" wrote:

> > > using Windows.Forms WF;

> >
> > unfortionally this dont works in my IDE. I'm using C#2005 beta, so

> probably
> > the reason Other ways ? (precide typing the whole namespace for one

> of
> > the 2)

>
> no the correct syntax is
>
> using WF = System.Windows.Forms;
>
> thats why is didn't work for you.
>
>
>

 
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
Objects copied when resizing/moving multiple objects quietchick Microsoft Powerpoint 1 22nd Nov 2009 09:49 PM
Transform DocumentItem Objects as Outlook Item Objects in folder Wnick Microsoft Outlook VBA Programming 5 22nd Feb 2008 07:59 PM
Copied/Pasted objects move/reformat pre-existing objects =?Utf-8?B?R3JlYXQgU2NvdHQgNzc=?= Microsoft Powerpoint 1 3rd May 2005 05:38 AM
100% Free MS Access .NET Code Generator (tired of hand cranking business objects/data objects) ? MyGeneration Microsoft Access 0 27th Jan 2005 04:55 AM
Unable to remove Sheet objects in the Microsoft Excel Objects Adrian Microsoft Excel Programming 1 26th Aug 2004 10:49 PM


Features
 

Advertising
 

Newsgroups
 


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