C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 10th, 2002, 07:35 PM
Fireman-x Fireman-x is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Posts: 7 Fireman-x User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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?
Comments on this post
Gran Roguismo agrees!

Reply With Quote
  #2  
Old January 10th, 2002, 07:52 PM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,172 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 29
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.

Reply With Quote
  #3  
Old January 10th, 2002, 08:52 PM
billyo billyo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 114 billyo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.
Comments on this post
Gran Roguismo agrees!

Reply With Quote
  #4  
Old January 12th, 2002, 12:04 AM
Lord MJ Lord MJ is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 34 Lord MJ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 57 m 2 sec
Reputation Power: 12
Send a message via AIM to Lord MJ Send a message via Yahoo to Lord MJ
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.

Reply With Quote
  #5  
Old January 12th, 2002, 07:46 AM
Marky_Mark Marky_Mark is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Location: On a screen near you
Posts: 498 Marky_Mark User rank is Private First Class (20 - 50 Reputation Level)Marky_Mark User rank is Private First Class (20 - 50 Reputation Level) 
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
Comments on this post
Gran Roguismo agrees!
__________________
100 trillion calculations per nanosecond

Reply With Quote
  #6  
Old January 14th, 2002, 02:56 AM
Datamike's Avatar
Datamike Datamike is offline
Web Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2001
Location: Finland
Posts: 719 Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level)Datamike User rank is Corporal (100 - 500 Reputation Level) 
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.

Reply With Quote
  #7  
Old January 14th, 2002, 04:57 AM
andnaess andnaess is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jul 2001
Location: Oslo
Posts: 1,516 andnaess User rank is Private First Class (20 - 50 Reputation Level)andnaess User rank is Private First Class (20 - 50 Reputation Level) 
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).
Comments on this post
Gran Roguismo agrees!
__________________
--
Regards
André Nęss

Puritanism: The haunting fear that someone, somewhere may be having fun

Reply With Quote
  #8  
Old January 14th, 2002, 07:15 AM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,172 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 29
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > C#

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap