By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,946 Members | 720 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,946 IT Pros & Developers. It's quick & easy.

modules in VS.NET.

P: n/a
Are there any plans to support C# modules in VS.NET in a future version.
Nov 22 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Hi Peter,

What's a module?

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Are there any plans to support C# modules in VS.NET in a future version.

Nov 22 '05 #2

P: n/a
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/de...tinternals.asp
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Are there any plans to support C# modules in VS.NET in a future version.

Nov 22 '05 #3

P: n/a
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.
"Robert Jacobson" <rj**********************@nospam.com> wrote in message
news:ef**************@TK2MSFTNGP12.phx.gbl...
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/de...tinternals.asp

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Are there any plans to support C# modules in VS.NET in a future version.


Nov 22 '05 #4

P: n/a
"Peter Rilling" <pe***@nospam.rilling.net> writes:
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

--
Lawrence
Nov 22 '05 #5

P: n/a
"Miha Markic" <miha at rthand com> writes:
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
--
Lawrence
Nov 22 '05 #6

P: n/a
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.
"Robert Jacobson" <rj**********************@nospam.com> wrote in message
news:ef**************@TK2MSFTNGP12.phx.gbl...
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/de...tinternals.asp

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Are there any plans to support C# modules in VS.NET in a future version.


Nov 22 '05 #7

P: n/a
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

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Os**************@TK2MSFTNGP12.phx.gbl...
Are there any plans to support C# modules in VS.NET in a future version.

Nov 22 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.