Re: Partial classes C# 2.0
- From: "Willy Denoyette [MVP]" <willy.denoyette@xxxxxxxxxx>
- Date: Tue, 23 Aug 2005 15:32:22 +0200
As far as I know, VB.NET v2.0 supports Partial classes just like C# does.
I'm I missing something?
Willy.
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:eb7Ug19pFHA.3680@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> Remember that both are different languages, so they don't have to support
> the same set of features, partial is one of this features, it's the
> compiler the one who take all the parts and ensemble them in a final
> class, that;s why you cannot split a class among different projects. doing
> so would move the responsability to ensemble it to the runtime, which is
> not the case.
>
> so it's even possible that c# implements the partial and not VB.net. in a
> similar way that VB allows the use of "with " and not c#
>
>
> cheers,
>
> --
> Ignacio Machin,
> ignacio.machin AT dot.state.fl.us
> Florida Department Of Transportation
>
>
> "Madhuri Mittal" <MadhuriMittal@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
> message news:FF75F0C4-7617-4459-B3FF-F1151D2F1F8A@xxxxxxxxxxxxxxxx
>> The reason I asked this question was- VB.Net allows you not to use
>> 'Partial'
>> keyword in one of it's source file definitions; however C# requires you
>> to
>> use the keyword 'partial' in all of its source files- I was trying to
>> understand the reasoning behind this?
>>
>> Madhuri
>>
>> "Richard Blewett [DevelopMentor]" wrote:
>>
>>> You definitely can't do it as each project compiles into a separate
>>> assembly and types are scoped to an assembly. in other words, Foo in the
>>> Bar assembly is considered, by the runtime, to be a different type to
>>> Foo is the Quuz assembly
>>>
>>> Regards
>>>
>>> Richard Blewett - DevelopMentor
>>> http://www.dotnetconsult.co.uk/weblog
>>> http://www.dotnetconsult.co.uk
>>>
>>> Hi,
>>>
>>> A simple test will give you the answer to this. ( I can;t do it as I do
>>> not
>>> have VS2005 in the office )
>>>
>>> AFAIK this is not possible. you can only do this inside the same
>>> assembly.
>>>
>>> Cheers,
>>>
>>> --
>>> Ignacio Machin,
>>> ignacio.machin AT dot.state.fl.us
>>> Florida Department Of Transportation
>>>
>>> "Madhuri Mittal" <MadhuriMittal@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
>>> message
>>> news:E828EAF9-3CC5-48E8-8E3E-55F4A37D26A8@xxxxxxxxxxxxxxxx
>>> > Hi,
>>> >
>>> > I know that we can define a class over multiple source files using
>>> the
>>> > keyword 'Partial' in C# within a project. Can we define the class
>>> over
>>> > multiple projects using the 'Patial' keyword- I know VB.Net does not
>>> allow
>>> > it, however was wondering if it's possible using C#?
>>> >
>>> > Madhuri Mittal
>>>
>>>
>>>
>>> [microsoft.public.dotnet.languages.csharp]
>>>
>
>
.
- Follow-Ups:
- Re: Partial classes C# 2.0
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: Partial classes C# 2.0
- References:
- Partial classes C# 2.0
- From: Madhuri Mittal
- Re: Partial classes C# 2.0
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: Partial classes C# 2.0
- From: Richard Blewett [DevelopMentor]
- Re: Partial classes C# 2.0
- From: Madhuri Mittal
- Re: Partial classes C# 2.0
- From: Ignacio Machin \( .NET/ C# MVP \)
- Partial classes C# 2.0
- Prev by Date: Re: Reentrant (?) Console Application....
- Next by Date: Re: Reentrant (?) Console Application....
- Previous by thread: Re: Partial classes C# 2.0
- Next by thread: Re: Partial classes C# 2.0
- Index(es):
Relevant Pages
|