The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> C Programming
|
C#
Discuss C# in the C Programming forum on Dev Shed. C# C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

January 10th, 2002, 07:35 PM
|
|
Member
|
|
Join Date: Dec 2000
Posts: 7
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
C#
Just wondering why C# was listed in the forum title. Correct me if I'm wrong (please do), but wasn't C# created by Microsoft, and isn't really related to C or C++ at all?
|

January 10th, 2002, 07:52 PM
|
 |
Big Endian
|
|
Join Date: May 2001
Location: Fly-over country
|
|
Q. How do you convert a Java program to a C# program?
A. Change the file extension.
While C# may have many differences with C++, I think it was grouped with the other C languages because a lot of C/C++ programmers in the Windows world (not everyone uses MFC) will start using it.
|

January 10th, 2002, 08:52 PM
|
|
Contributing User
|
|
Join Date: Jun 2000
Posts: 114
Time spent in forums: < 1 sec
Reputation Power: 13
|
|
|
There are deifinitely some features found in both languages, but I think Java is more of a subset of C# than vice versa. C# has pointers, overloaded operators and a host of other features not found in Java. On the otherhand, Java has anonymous inner classes and dynamic class loading... It will be interesting to see if C# takes off or not, but in my opinion it has more in common with C++ than Java, so I think this is the right forum it.
|

January 12th, 2002, 12:04 AM
|
|
Contributing User
|
|
Join Date: Aug 2001
Posts: 34
Time spent in forums: 4 h 57 m 2 sec
Reputation Power: 12
|
|
|
Java does have pointers, the whole language was desinged on the concept of pointers, it just that in Java they took away all the evil things that you can do with them, you can only dereference pointers in Java. The one limitation is that you can not create pointers to primitive types in java.
|

January 12th, 2002, 07:46 AM
|
|
Contributing User
|
|
Join Date: Sep 2001
Location: On a screen near you
Posts: 498

Time spent in forums: < 1 sec
Reputation Power: 12
|
|
|
C# has pointers
Everything ive read about C# told me it has memory management similar to Java's garbage collection
I don't think C# will be a flop, Microsoft doesn't make flops
From what ive read about C# it comes across as a language that is simple to construct like Visual Basic and has the full power of C++ with C++'s libraries and a few cloned Java libraries
To get at the real guts of the system though, you need to jump out of C# into real code mode... Supposedly this is for the programming proffesional who knows what he or she is doing
It's a combination of VB and VC without pointers and the need to manage memory so it should appeal to lots of women
Mark
__________________
100 trillion calculations per nanosecond
|

January 14th, 2002, 02:56 AM
|
 |
Web Developer
|
|
Join Date: Oct 2001
Location: Finland
Posts: 719
  
Time spent in forums: 11 h 27 m 33 sec
Reputation Power: 14
|
|
Quote: Originally posted by Marky_Mark
... Microsoft doesn't make flops |
Since when? 
__________________
-- Tomi Kaistila
-- Developer's Journal
The more you learn, the more you know.
The more you know, the more you forget.
The more you forget, the less you know.
|

January 14th, 2002, 04:57 AM
|
|
Contributing User
|
|
Join Date: Jul 2001
Location: Oslo
Posts: 1,516

Time spent in forums: < 1 sec
Reputation Power: 13
|
|
Quote: Originally posted by Marky_Mark
To get at the real guts of the system though, you need to jump out of C# into real code mode... Supposedly this is for the programming proffesional who knows what he or she is doing |
Are you talking about MSIL? I don't think the idea is that people are going to write MSIL code, just like nobody writes Java Bytecode (well ok, we actually did in a course on hardware architechture, but that was for learning purposes).
__________________
--
Regards
André Nęss
Puritanism: The haunting fear that someone, somewhere may be having fun
|

January 14th, 2002, 07:15 AM
|
 |
Big Endian
|
|
Join Date: May 2001
Location: Fly-over country
|
|
Quote: Originally posted by andnaess
Are you talking about MSIL? |
I think he's talking about "unsafe mode" where you can use the unsafe keyword to explicitly reference memory. The following is from an O'Reilly interview about C#:
http://windows.oreilly.com/news/csh...rview_0201.html
Quote:
Stewart: What is "unsafe mode" in C#, and how does it work?
Albahari: Contrary to the claims I've heard some people make, unsafe mode does not equip programmers with a loaded gun. C# has an unsafe keyword, that you can use to mark a region of code that explicitly manages memory. This is useful when you don't want to be restricted by the primary memory model that the runtime imposes on you, like where all variables are type-safe and everything is automatically garbage collected. For instance, in an unsafe block you can get a pointer to an array and just zap it with zeros. Generally you wouldn't want to do this; but if you're doing some really fast graphics process, it might be the extra bit of performance you need.
Another example is when you're dealing with memory outside of the managed heap. You might be interoperating with native dlls, and want to explicitly use pointers. It's nice to do this within your C# program rather than write some extra dlls to do this for you. Of course, when you start explicitly managing memory you can read or write to some arbitrary address in an inadvertent or malicious way. So code marked as being unsafe can't safely execute without the appropriate security permissions, which is why it's called unsafe. The language and APIs have been designed so that over 99 per cent of the time you won't need or want to use unsafe code. VB.NET for instance, doesn't have it. |
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|