Re: Partial classes C# 2.0

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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]
>>>
>
>


.



Relevant Pages

  • Re: A Question about DEFPACKAGE syntax
    ... you give is a reason NOT to use strings. ... "FOO" does not create superficial symbols in the keyword package ... not creating those extra few symbols in the KEYWORD package is ...
    (comp.lang.lisp)
  • Re: Partial classes C# 2.0
    ... The reason I asked this question was- VB.Net allows you not to use 'Partial' ... keyword in one of it's source file definitions; ... use the keyword 'partial' in all of its source files- I was trying to ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: access closure variable
    ... (lambda (command &optional args) ... Keywords are not really package independent. ... :FOO ... The reader will read:foo as a symbol in the keyword package. ...
    (comp.lang.lisp)
  • Re: identifiers and modules
    ... Do you have a reason why a language should allow it? ... (let ((foo (transform-value foo))) ...)) ... working on a large nested function can easily use the wrong variable ... Given that allowing an inner declaration to override an outer ...
    (comp.lang.scheme)
  • Re: reason for having separate package.lisp?
    ... I just type:foo at SLIME prompt and press M-. ... And I see no reason why it ... Adding a package file implies creation of .asd file too. ... asdf-install, or want to make asd systems depend on the file, we would ...
    (comp.lang.lisp)