P
Peter Row
Hi,
BACKGROUND TECH:
WinXP Pro SP1, VS.NET Ent 2003, .NET 1.1
I am more familar with VB.NET but am about to start on a C# project.
So I started on a simple console app that would let me get my feet wet.
Any how I came across this annoying issue when using classes from
different namespaces in my console application.
At the top of my only code file I have these imports:
using System;
using System.Text;
using System.Xml;
using System.IO;
In code in order to declare an XslTransform object I have to say:
System.Xml.Xsl.XslTransform srcXslt;
If I try to say:
Xsl.XslTransform srcXslt;
I get a compile error saying it doesn't recognise Xsl as a class or
namespace. A quick note here is that it doesn't auto-syntax when I
type the period after Xsl either.
I got a colleaguge whose main .NET language is C# to try it and he got
the same problem.
Is there some weird C# configuration option or is this something that
Microsoft decided would make people like VB.NET more?
In VB.NET if I say:
Imports System
Imports System.Text
Imports System.Xml
Imports System.IO
And then in code say:
Dim srcXslt As Xsl.XslTransform
Then that compiles without problem.
The reasons this is annoying to me (and I imagine others) should be
obvious. The only way round it is to either (a) fully qualify the
declaration
(i.e. lots of pointless typing) or (b) add a using statement for every
child namespace I want to use.
Regards,
Peter
BACKGROUND TECH:
WinXP Pro SP1, VS.NET Ent 2003, .NET 1.1
I am more familar with VB.NET but am about to start on a C# project.
So I started on a simple console app that would let me get my feet wet.
Any how I came across this annoying issue when using classes from
different namespaces in my console application.
At the top of my only code file I have these imports:
using System;
using System.Text;
using System.Xml;
using System.IO;
In code in order to declare an XslTransform object I have to say:
System.Xml.Xsl.XslTransform srcXslt;
If I try to say:
Xsl.XslTransform srcXslt;
I get a compile error saying it doesn't recognise Xsl as a class or
namespace. A quick note here is that it doesn't auto-syntax when I
type the period after Xsl either.
I got a colleaguge whose main .NET language is C# to try it and he got
the same problem.
Is there some weird C# configuration option or is this something that
Microsoft decided would make people like VB.NET more?
In VB.NET if I say:
Imports System
Imports System.Text
Imports System.Xml
Imports System.IO
And then in code say:
Dim srcXslt As Xsl.XslTransform
Then that compiles without problem.
The reasons this is annoying to me (and I imagine others) should be
obvious. The only way round it is to either (a) fully qualify the
declaration
(i.e. lots of pointless typing) or (b) add a using statement for every
child namespace I want to use.
Regards,
Peter