Jump to content
Science Forums

Open-source


Recommended Posts

"Shared Source Common Language Infrastructure 1.0 Release

The Shared Source CLI is a compressed archive of the source code to a working implementation of the ECMA CLI and the ECMA C# language specification. This implementation builds and runs on Windows XP, the FreeBSD operating system, and Mac OS X 10.2."

 

Overview

The Common Language Infrastructure (CLI) is the ECMA standard that describes the core of the .NET Framework world. The Shared Source CLI is a compressed archive of the source code to a working implementation of the ECMA CLI and the ECMA C# language specification.

 

This implementation builds and runs on Windows XP, the FreeBSD operating system, and Mac OS X 10.2. It is released under a shared source initiative. Please see the accompanying license <http://msdn.microsoft.com/MSDN-FILES/027/002/097/ShSourceCLILicense.htm>..

 

The Shared Source CLI goes beyond the printed specification of the ECMA standards, providing a working implementation for CLI developers to explore and understand. It will be of interest to academics and researchers wishing to teach and explore modern programming language concepts, and to .NET developers interested in how the technology works.

 

Features

The Shared Source CLI archive contains the following technologies in source code form:

* An implementation of the runtime for the Common Language Infrastructure (ECMA-335) that builds and runs on Windows XP, the FreeBSD operating system, and Mac OS X 10.2.

* Compilers that work with the Shared Source CLI for C# (ECMA-334) and JScript.

* Development tools for working with the Shared Source CLI such as assembler/disassemblers (ilasm, ildasm), a debugger (cordbg), metadata introspection (metainfo), and other utilities.

* The Platform Adaptation Layer (PAL) used to port the Shared Source CLI from Windows XP to FreeBSD and Mac OS X.

* Build environment tools (nmake, build, and others).

* Documentation for the implementation.

* Test suites used to verify the implementation.

* A rich set of sample code and tools for working with the Shared Source CLI.

 

New in this Release

A more detailed list of what's new in this release is included in the FAQ (below).

* Support for Mac OS X 10.2.

* Additional code clean-up and bug fixes.

* Debugger improvements.

* Class reference documentation (separate archive) and additional samples.

* Build system improvements and additional test cases and tool improvements."

(http://www.microsoft.com/downloads/details.aspx?FamilyId=3A1C93FA-7462-47D0-8E56-8DD34C6292F0&displaylang=en)

Link to comment
Share on other sites

  • Replies 37
  • Created
  • Last Reply

Top Posters In This Topic

"All the .NET languages have access to the same class libraries [i.e., the FCL]. In addition, all languages are equally powerful. There is no superior language in .NET; Visual Basic .NET is as powerful as Visual C# or Visual C++ .NET." (Developing XML Web Services and Server Components with Microsoft Visual Basic .NET and Microsoft Visual C# .NET, Kathy Harding, Jean Trenary, and Bob Willer (editors), Microsoft Press, 2003, p5)

Link to comment
Share on other sites

Alexander: ok, here is the one i know that VB cant do (at least last time i checked): VB cant iterate over the properties of a class like C++.

 

Tsk tsk…wrong again "Doctor". You've never heard of the Reflection namespace in ..NET, have you.

 

Here's something from Visual Studio .NET help...I've highlighted a couple key parts.

 

"The System.Type class is central to reflection. The common language runtime creates the Type for a loaded type when reflection requests it. You can use a Type object's methods, fields, properties, and nested classes to find out everything about that type.

 

Use Assembly.GetType or Assembly.GetTypes to obtain Type objects from assemblies that have not been loaded, passing in the name of the type or types you want. Use Type.GetType to get the Type objects from an assembly that is already loaded. Use Module.GetType and Module.GetTypes to obtain module Type objects.

 

The following example shows the syntax necessary to get the Assembly object and module for an assembly.

 

[Visual Basic]

' Gets the mscorlib assembly in which the object is defined.

Dim a As Reflection.Assembly = GetType(Object).Module.Assembly

 

[C#]

....

 

The following example demonstrates getting Type objects from a loaded assembly.

 

[Visual Basic]

' Loads an assembly using its file name.

Dim a As Reflection.Assembly = Reflection.Assembly.LoadFrom("MyExe.exe")

' Gets the type names from the assembly.

Dim types2 As Type() = a.GetTypes()

Dim t As Type

For Each t In types2

Console.WriteLine(t.FullName)

Next t

 

[C#]

....

 

Once you obtain a Type, there are many ways you can discover information about the members of that type. For example, you can find out about all the type's members by calling the Type.GetMembers method, which obtains an array of MemberInfo objects describing each of the members of the current type.

 

You can also use methods on the Type class to retrieve information about one or more constructors, methods, events, fields, or properties that you specify by name. For example, Type.GetConstructor encapsulates a specific constructor of the current class.

 

In fact, you can know absolutely nothing about a class - not even know that it exists - and setup your code such that during runtime, it uses Reflection to interrogate the metadata of the current .NET assembly to find out what types (classes) are available, and what their methods, fields, and properties are - shoot, you can even find out what the signature is for one of the class's methods, create an appropriate array of objects as arguments, and then invoke that method, even though you never knew even knew the method - or even the class - existed.

 

Isn't VB .NET simply amazing! :-)

Link to comment
Share on other sites

Telemad, your insight is impressive and I appreciate your documenting your stance. But a friendly request from me: could you try to loosen up on the "wrong again" phrase? It suffices to point out where Alexander is wrong, no need to repeatedly make fun of him.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...