modules in VS.NET.

  • Thread starter Thread starter Peter Rilling
  • Start date Start date
Do you mean like a VB.Net module? If so, probably not. A VB.Net module is
really just a sealed(NotInheritable) class with static (Shared) members, so
there isn't any particular need for the "module" syntax in C#. For example,
these code snippets are identical:

Module Module1

Sub Main()
DoSomething()
End Sub

End Module


sealed class Module1 {

static void Main() {
DoSomething();
}

}


For details:
"Visual Basic .NET Internals"
http://msdn.microsoft.com/library/d...tml/vbtchmicrosoftvisualbasicnetinternals.asp
 
Actually, if memory serves, C# is supposed to gain this feature at some
point(I don't know if it'll be 2.0 or longhorn time frame however). The
syntax was supposed to be something like
public static class Class1
{
public static void Class1Method()
{
}

}

I forget where I read that, and it may not be true any longer, but it seems
to me that it was being added.

On the other hand, if the op is talking about netmodules, I also recall
reading about an addition to whidbey that adds easier use of them, but again
I don't know where I read that or if its valid offhand.
 
Peter Rilling said:
Are there any plans to support C# modules in VS.NET in a future version.

I don't know if in the future VS.NET will be able to compile
modules but... maybe yes.

bye
 
Miha Markic said:
Hi Peter,

What's a module?

c:\>csc /nologo /t:module hello.cs
c:\>dir
hello.netmodule

Modules are assemblies without manifest, allowing you to merge modules created
in different languages within a single assembly
 
I am not referring to the VB.NET "module" construct but rather the
capability to compile code to a .netmodule file. This can be done on the
CSC compiler, but not in VS.NET. VS.NET only supports executables and
assembly libraries.
 
Peter,
I understand that Whidbey (VS.NET 2004) will support .net modules.

See the thread titled "'static library' in .net 2.0?" in the
microsoft.public.dotnet.framework newsgroup around 20 January 2004.

I understand that VS.NET 2004 should be available late 2004.

Hope this helps
Jay
 
Back
Top