Re: Source Tree Structure

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



Repertory has the same meaning as Directory or as Folder.

You are right about your example, if /com is the root or the starting
directory of your solution. This is mandatory in Java but not in .NET.

I don't know if that is the typical convention followed by people but it
doesn't hurt to follow it. Also, this is for C#; it is possible that
VStudio for VB.NET follows a different convention.

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC


"pearsons_11114" <pearsons11114@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0CDC4916-CA17-49D4-A35E-296EDED92C32@xxxxxxxxxxxxxxxx
> Hmm, not sure I follow. I wasn't able to find anything on "repertory", a
> term
> I'm not familiar with. But I take what you said below to mean that VS will
> follow the same convention as Java for a pre-existing source tree? For
> example, with the following source file:
>
> /com/company/xxx/yyy/MyClass.cs
>
> VS will add a namespace statement of "com.company.xxx.yyy" to the source?
>
> If so, does that mean that that's the typical convention that people
> follow?
> Just looking for a consensus opinion. Thanks!
>
> "Sylvain Lafontaine" wrote:
>
>> No, there is no relation between namespaces and the source file locations
>> in
>> ..NET. By default, if you create a repertory and create a source file
>> there,
>> VS.NET will add the name of the repertory to the namespace but it's not
>> mandatory and can be changed.
>>
>> --
>> Sylvain Lafontaine, ing.
>> MVP - Technologies Virtual-PC
>>
>>
>> "pearsons_11114" <pearsons11114@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
>> message
>> news:FFAE3190-1AEC-4EE2-8BA9-3E17D08E4DCC@xxxxxxxxxxxxxxxx
>> > Newbie to .NET from Java, have a question about
>> > requirements/conventions
>> > for
>> > source tree layout. In Java there a convention-bordering-on-requirement
>> > that
>> > a source file's location in the source tree be determined by the
>> > package
>> > it
>> > belongs to. Java IDEs do this automatically. I haven't found any
>> > documentation for this in dotnet. VS by default dumps new source files
>> > into
>> > the root regardless of namespace. Are there any conventions for this?
>> > Thanks!
>>
>>
>>


.



Relevant Pages

  • Re: Source Tree Structure
    ... with the following source file: ... VS will add a namespace statement of "com.company.xxx.yyy" to the source? ... By default, if you create a repertory and create a source file there, ... >> Newbie to .NET from Java, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Source Tree Structure
    ... > VS will add a namespace statement of "com.company.xxx.yyy" to the source? ... VS will also append sub-directories to the namespace, so for a root ... namespace of X, if you create a source file in a folder within the project, ... does that mean that that's the typical convention that people ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Source Tree Structure
    ... there is no relation between namespaces and the source file locations in ... By default, if you create a repertory and create a source file there, ... VS.NET will add the name of the repertory to the namespace but it's not ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: location of using, include, and namespaces statement
    ... > directive now apply to the client's source file, too, if he ever ... > And would it help or hurt to put the 'using' directives inside ... your'e quite right - if namespace pollution is a concern [I suppose it ... > the header when you're not looking. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: whynot write code in stdafx.cpp?
    ... Convention, pure and simple. ... there's nothing wrong with using that as the PCH builder. ... The reason for the convention is just that - PCH building is expensive, ... Using a non-empty source file as the PCH builder means that you'll ...
    (microsoft.public.dotnet.languages.vc)