Namespaces

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I am just learning C# so excuse the simplicity of this question. I work at
Seagate Technology and I want to be able to create a .NET assembly specific
to our Oracle database. I want to do something like this:

using System;

namespace Seagate.Oracle
{
/// <summary>
/// Summary description for Connection.
/// </summary>
public class Connection
{
public Connection()
{
//
// TODO: Add constructor logic here
//
}

public static void Open()
{
}
}
}

Now, I am also using Oracle's ODP.NET data provider and I want to be able to
reference classes from the Oracle.DataAccess.Client namespace within my
Seagate.Oracle namespace, but it doesn't work. Whenever I want to reference
a class from the Oracle.DataAccess.Client namespace, it always resolves to
Seagate.Oracle first. For example, I would like the Open method to look
like this:

public static void Open(Oracle.DataAccess.Client.OracleConnection conn)

but as soon as I type Oracle. it resolves to Seagate.Oracle instead of
Oracle.DataAcess.Client and the autocomplete wants to finish the statement
as Seagate.Oracle.Connection. Is there a way to reference the
Oracle.DataAccess.Client namespace from within the Seagate.Oracle namespace
without me having to change the name of my namespace to be different than
the Oracle namespace?

Oh and yes, I have added the reference to Oracle.DataAccess.Client to my
project.

Any help is greatly appreciated.


.



Relevant Pages

  • Re: VS2005 C#: User Testing
    ... The type or namespace name 'Drawing' does not exist in the namespace ... 'System' (are you missing an assembly reference?) ... Run it again, as now it should find it as a resource, and not be trying ... Studio altogether, not knew to programming. ...
    (microsoft.public.vstudio.general)
  • VS2005 C#: User Testing
    ... The type or namespace name 'Drawing' does not exist in the namespace ... 'System' (are you missing an assembly reference?) ... essentially a sizable hint window. ... Run it again, as now it should find it as a resource, and not be trying ...
    (microsoft.public.vstudio.general)
  • Re: use-package & name conflict: why they are not deferred?
    ... All symbols in C++ are in fact in one global namespace. ... All names are strings in the BSS segment. ... When C++ compilers generate code for this kind of linkage, ... resolving a reference of an identifier to a symbol). ...
    (comp.lang.lisp)
  • Re: bug in clientpost.cs?
    ... Add a reference to system.web.dll. ... > HttpUtility' belongs to the namespace System.web according to the doc. ... > So i do not understand why the code can not compile. ... > public static void Main{ ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Bug in Clientpost.cs?
    ... Add a reference to system.web.dll. ... > HttpUtility' belongs to the namespace System.web according to the doc. ... > So i do not understand why the code can not compile. ... > public static void Main{ ...
    (microsoft.public.dotnet.general)