Re: using = <type> directive
- From: Dylan Nicholson <wizofaus@xxxxxxxxxxx>
- Date: Mon, 10 Dec 2007 20:57:32 -0800 (PST)
On Dec 11, 10:41 am, "Peter Duniho" <NpOeStPe...@xxxxxxxxxxxxxxxx>
wrote:
On Mon, 10 Dec 2007 14:41:35 -0800, Dylan Nicholson <wizof...@xxxxxxxxxxx>
wrote:
Can someone confirm that a) is illegal, and b) the solution?
Well, you could have used, instead of b), this:
namespace Test
{
using MyQueue = System.Collections.Generic.Queue<MyStruct>;
struct MyStruct
{
int a;
int b;
}
class MyClass
{
MyQueue q = new MyQueue();
}
}
Ah, well, I thought I'd tried that, and because it put a squiggly line
under "MyStruct" in the using directive when I typed it, I assumed it
wasn't legal. But you're right, this is fine, and not really all that
silly.
.
- References:
- using = <type> directive
- From: Dylan Nicholson
- Re: using = <type> directive
- From: Peter Duniho
- using = <type> directive
- Prev by Date: Re: Would C++/CLI solve PInvoke problems that C# has in this situation? What is the advantages using C++/CLI then C# when PInvoking umanaged C++ Code. Major problems here.
- Next by Date: Prevent users from reading application generated files
- Previous by thread: Re: using = <type> directive
- Next by thread: Edit only date in grid
- Index(es):
Relevant Pages
|