writing C# code which doesn't target the common language runtime (CLR).

L

larry

I was just looking at a demo training that mindleaders has on .net
training:

http://www.mindleaders.com/products/democourse3.asp

And I don't believe this is correct or at least is misleading to me:

"The search for an easy, productive, and very powerful programming
language led to the birth of Visual C#. Visual C# incorporates the
best features of Visual C++ and Visual Basic. Visual C# enables you to
write unmanaged code, which is code that doesn't target the common
language runtime (CLR). The code can bypass the .NET Framework
application programming interface (API) and make direct calls to the
operating system. This makes it as powerful as Visual C++."

They might be alluding to the fact that c# can call Win32 api's easier
than vb6 code can. To "bypass" the framework might mean to use Win32
methods instead of the .net framework classes to get a task done.

But the "doesn't target the CLR" just seems incorrect to me.

Comments?

PS the demo training looks very nice, anyone taken their courses?
 
C

C# Learner

I was just looking at a demo training that mindleaders has on .net
training:

http://www.mindleaders.com/products/democourse3.asp

And I don't believe this is correct or at least is misleading to me:

"The search for an easy, productive, and very powerful programming
language led to the birth of Visual C#. Visual C# incorporates the
best features of Visual C++ and Visual Basic. Visual C# enables you to
write unmanaged code, which is code that doesn't target the common
language runtime (CLR). The code can bypass the .NET Framework
application programming interface (API) and make direct calls to the
operating system. This makes it as powerful as Visual C++."

They might be alluding to the fact that c# can call Win32 api's easier
than vb6 code can. To "bypass" the framework might mean to use Win32
methods instead of the .net framework classes to get a task done.

But the "doesn't target the CLR" just seems incorrect to me.

Comments?

Well, for starters, even the first line is incorrect - "The search for
an easy, productive, and very powerful programming
language led to the birth of Visual C#"

Since when is an IDE a programming language?
 
M

Markus Seger

for starters, even the first line is incorrect - "The search
for
an easy, productive, and very powerful programming
language led to the birth of Visual C#"

Since when is an IDE a programming language?

Since when is Visual C# an IDE? Visual C# is a programming
language which is, among other programming languages,
integrated in an IDE called Visual Studio .NET.

Markus
 
B

Bruno Jouhier [MVP]

C# is a language
Visual C# is an IDE

Bruno

Markus Seger said:
for starters, even the first line is incorrect - "The search
for

Since when is Visual C# an IDE? Visual C# is a programming
language which is, among other programming languages,
integrated in an IDE called Visual Studio .NET.

Markus
 
C

C# Learner

Markus Seger said:
for starters, even the first line is incorrect - "The search
for

Since when is Visual C# an IDE? Visual C# is a programming
language which is, among other programming languages,
integrated in an IDE called Visual Studio .NET.

Markus

C# is a programming language.

Visual C# is an IDE. Borland C# Builder is an IDE.

Regards
 
M

Morten Wennevik

They may be referring to the word 'unsafe' which indeed lets you bypass
the framework.
In effect it also disables the garbage collector while in use, so you need
to do your own memory handling (pointers are allowed when in unsafe mode).
 
N

Nick Malik

Seperate from the semantic argument about whether Visual C# is a language or
an IDE...(waged on another thread)

And seperate from the little history rewrite in the first sentence...

The next two sentences are fairly correct. The misimpression may come from
any reader hoping to create an application that EXCLUDES the .NET Framework,
which (AFAIK) C# will not let you do. Unmanaged code can be written that
will not use most of the capabilities of the .NET framework. It is true,
though, that an author can write an application that does not target (or
direct it's attention to) the .NET framework, especially if the code is done
entirely in an unmanaged fashion.

I worry about the statement that "unmanaged code" makes the language as
powerful as C++. IMHO, the C# language, as implemented on the Microsoft
..NET platform, is as powerful as the C++ language without adding in the
unmanaged extensions. The unmanaged extensions allow much better
integration with C and C++ libraries, including the Win32 API, and some code
efficiencies useful for writing kernel code and the like. If anything, the
combination of Managed and Unmanaged environments makes C# more powerful
than C++.

I'm a little biased on this issue, I'm afraid.

Perhaps the technical content of the site is less sloppy than their
introduction to the language.

--- Nick
 
R

Ray

C# is a programming
language which is, among other programming languages,
integrated in an IDE called Visual Studio .NET.

and in an IDE called C#Builder which some think is better, it certainly is
cheaper.

Ray
 
R

Rob Teixeira [MVP]

I think the author got his wires crossed.
Visual C# does NOT allow you to write unmanaged code, but it does allow you
to interact extremely well with unamanged code (in the form of DLLs written
for win32 that are not themselves managed assemblies written in .NET). That
seems to be the case with his statement of "make direct calls to the
operating system" (something that other managed environments like Java
discourage), and perhaps that's the point he's trying to make. But the first
part of that statement "enables you to write unamanged code" is incorrect.
C# allows you to write "unsafe" code, but that has nothing to do with
"bypassing the .NET Framework" either, or writing "unmanaged" code, but it's
a common mistake to confuse the two, and unfortunately, a lot of authors
seem to make it.

Also, I'm not certain that calling win32 APIs are really easier than VB6.
P/Invoke and VB6 use an extremely similar mechanism to call those functions,
but .NET (any .NET language actually, or rather the runtime itself) also has
a marshalling infrastructure under the covers to marshal data between
managed and unmanaged code - something VB6 doesn't need to do.

-Rob Teixeira [MVP]
 
L

larry

Great info, thanks all.

To summarize:
C# - Cannot write unmanaged code
C# - managed code (.net framework required, whether it's used or not)
|
+- Safe Code
|
+- Unsafe Code
|
+- Unmangled code
|
+- Mangled Code
|
+- Unimaginable Code
|
+- Manageable Code
: )
 
C

C# Learner

Champika Nirosh said:
I believe it only if you developed the language ...

Then what is Visual Basic?

Visual Basic is an IDE which uses a modified version of the BASIC
language.
If visual c# is the IDE then what is Microsoft Visual C# .NET is..??

Visual C# is Microsoft Visual C# .NET. It's just sometimes more
convenient to use the shorter alias.
I guess according to most of the MSDN document they treat Vsiual C# as the
language .. not to be mentioned they are the inventors

Do you have a URL that shows them referring to Visual C# as the actual
language?

Regards
 
C

C# Learner

Champika Nirosh said:
I also in your side until I saw couple of documents at MSDN refered to c#
language as
Visual C# Language
They are very misleading

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cscon/html/
vcoricstartpage.asp


Nirosh

Hmm... there's still no mention of a "Visual C#" language. The
closest it comes is with this line:

C# is introduced as Visual C# in the Visual Studio .NET suite.

I interpret that as meaning, "C# is the language used in Visual C#
(IDE), which is part of the Visual Studio .NET suite (of IDEs)."

Regards
 
C

C# Learner

Daniel O'Connell said:
The languge is C#, the microsoft implementation is Visual C#.

Surely you mean, "Microsoft's IDE which uses the C# language, is
Visual C#", right?

<snip>
 
D

Daniel O'Connell [C# MVP]

C# Learner said:
Surely you mean, "Microsoft's IDE which uses the C# language, is
Visual C#", right?
No, an excerpt from the framework compiler's about text:
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322

Visual C# is a product name, there is the Visual C# IDE, the Visual C#
compiler, maybe a thing or two else as well. As with all things, MS's C#
compiler isn't *perfectly* ECMA compliant, nor is monos(which seems to be
aimed more at MS compliance than ECMA compliance) or any other one I know
of. Its more apparent in Whidbey, generics, iterators, etc are not
standard(yet) pieces of the language. Any specifics that aren't standardized
would be Visual C# extensions.

All in all, its really rather subtle and unimportant, don't you think?
 
C

C# Learner

Daniel O'Connell said:
No, an excerpt from the framework compiler's about text:
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4
for Microsoft (R) .NET Framework version 1.1.4322

Visual C# is a product name, there is the Visual C# IDE, the Visual C#
compiler, maybe a thing or two else as well. As with all things, MS's C#
compiler isn't *perfectly* ECMA compliant, nor is monos(which seems to be
aimed more at MS compliance than ECMA compliance) or any other one I know
of. Its more apparent in Whidbey, generics, iterators, etc are not
standard(yet) pieces of the language. Any specifics that aren't standardized
would be Visual C# extensions.

So according to this I'm wrong then - Visual C# is both an IDE *and* a
language.
All in all, its really rather subtle and unimportant, don't you think?

It's important to me, since it was me who made the, according to the
above, incorrect statement in the first place.
 
D

Daniel O'Connell [C# MVP]

C# Learner said:
So according to this I'm wrong then - Visual C# is both an IDE *and* a
language.


It's important to me, since it was me who made the, according to the
above, incorrect statement in the first place.

Hrm, I see. Well, by my understanding, it is a language although it really
usually isn't a language. Most of the time Visual C# should be identical to
C#, the difference will only come when a feature is added to MS's C#
implementation that isn't in the spec. The lines are blurry and hard to
determine, but since Microsoft product names usually apply as the language
name as well(Visual C++ is Visual C++, there are some MS specific
extensions), it seems to be the case. As far as I am concerned, its all C#.
The only other major compiler(mono) emulates csc, not the ecma spec(although
they both are pretty conformant to my knowledge). I feel its safe to call it
C# and will rarely, if ever, call the language Visual C#. Its still a matter
of technicality.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top