What can't you do with C#?

as opposed to native c++ app

Page 1 of 1

9 Replies - 9751 Views - Last Post: 24 November 2008 - 07:34 AM Rate Topic: -----

#1 badjava  Icon User is offline

  • Lux Ex Tenebris
  • member icon

Reputation: 14
  • View blog
  • Posts: 540
  • Joined: 30-October 08

What can't you do with C#?

Post icon  Posted 21 November 2008 - 02:50 AM

Hi guys,

I decided I need to learn C# to write a useful program outside of the class room.

I have some experience with C and I'm learning C++ now (had to drop my java class :sad:) and my COBOL experience isn't very relevant.

For a true full blown home user or business windows application C# makes more sense to me than Java.

So tonight I installed VS 2008 on my pc and laptop and started the basic tutorials and reading the intro's to the language.

One of the things that jumped out at me, since they mention it right up front, is that C# can do almost everything a native C++ application can do.

Could someone break down in laymens terms what C# can't do? I'm not looking at developing a FPS game or anything like that.

My intended target startig out will be the cute widget type novelty programs and more truly useful utility programs as I advance and it would be good to know going in what short comings I will run in to with C#.

I don't imagine I'll be replacing the disk defragmenter program with a C# app! ;) but maybe there are some serious shortfalling of C# you guys know of?

Is This A Good Question/Topic? 0
  • +

Replies To: What can't you do with C#?

#2 Grondhammar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 19-November 08

Re: What can't you do with C#?

Posted 21 November 2008 - 08:46 AM

The primary difference between C# and C++ (besides C# being a heck of a lot easier to read) is that C# is a memory-managed language. You can do things like bitshifting and other binary operations, but don't expect the same sort of raw memory-bending abilities you have in C++. If you're not doing games or other operations that need extreme performance and optimisation, I'd take that as a big plus rather than a downside of C#.

There are a few other small to insignificant things you can't do in C# that you can in C++ (i.e. can't cast boolean to int, structs don't behave exactly like classes, no pointers) but I would guess that, for all of these, you could easily find a work-around.

Best of luck. I've found it to be a very clean, easy language to work in for most tasks.
Was This Post Helpful? 0
  • +
  • -

#3 corliss  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 189
  • Joined: 25-October 06

Re: What can't you do with C#?

Posted 21 November 2008 - 09:06 AM

I feel that the difference is that everything in C# is a "wrapper class". C# is simliar to Java in terms of the way that objects are instantiated.I am not referring to memory but rather the way that you initalize variables and create classes.
C++ in my mind is that you have to make everything from scratch, this is that there are few wrapper classes. C++ is a great foundational language and that is why it is offerd in every compsci programme.
I terms of limitations I would say that it may be faster to write code for certain things in each language but overall they are both great to know.
Was This Post Helpful? 0
  • +
  • -

#4 badjava  Icon User is offline

  • Lux Ex Tenebris
  • member icon

Reputation: 14
  • View blog
  • Posts: 540
  • Joined: 30-October 08

Re: What can't you do with C#?

Posted 21 November 2008 - 01:21 PM

Thank you for the input guys, this concurs with what I'm reading out in the wild on my net searches.

When I read there are some things you can't do with C# I was concerned there may be a more major limitation accessing a basic system component or operation, rather than just casting or manual memory management.

Especially at this stage in my programming I think I'll take the managed model and ease of production over (nearly) machine level control and optimized code.

Thank you again for the replies. If anyone else has any thoughts feel free to toss out your $.02. :)
Was This Post Helpful? 0
  • +
  • -

#5 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: What can't you do with C#?

Posted 21 November 2008 - 02:47 PM

As far as Java, Im not sure there's anything you cant do in C# that can be done in Java. Since C# was molded after C++ and Java there isnt much that cant be done in C# that can be done in the aforementioned languages. C# isn't a wrapper for anything. C# has it's classes, no different than C++ (take a look at count, cin, getch, etc, they're all classes within the language). C# is, as already mentioned, a managed language, meaning Garbage Collection, for the most part, takes care of system resources for you.

From someone who can program in both C# and C++ I personally prefer working with C#. The .Net Framework takes care of a lot for you that isn't so in C++, meaning for the most part you don't have to work about memory leaks, corrupting memory or the likes (unless of course you're using unsafe code in C#, which to me makes absolutely no sense to me anyways). In my humble opinion here are certain things that are much easier to accomplish with C# than with C++, such as working with graphics and interacting with a database (I know some C++ diehards will flame me for that statement).

One major downfall with C# over Java and C++ is with a C# application the .Net framework has to be installed on the target machine, and it isn't cross compatible with other OS's, whereas C++ and Java are
Was This Post Helpful? 0
  • +
  • -

#6 badjava  Icon User is offline

  • Lux Ex Tenebris
  • member icon

Reputation: 14
  • View blog
  • Posts: 540
  • Joined: 30-October 08

Re: What can't you do with C#?

Posted 22 November 2008 - 09:21 PM

View PostPsychoCoder, on 21 Nov, 2008 - 01:47 PM, said:

One major downfall with C# over Java and C++ is with a C# application the .Net framework has to be installed on the target machine, and it isn't cross compatible with other OS's, whereas C++ and Java are


Wouldn't it be funny if 5-10 years from now C# is roadkill and its because MS refused to port .net to different platforms thinking that would entice everyone else in the world to only use windows? :pirate:
Was This Post Helpful? 0
  • +
  • -

#7 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1525
  • View blog
  • Posts: 5,961
  • Joined: 21-March 08

Re: What can't you do with C#?

Posted 23 November 2008 - 09:05 AM

View PostPsychoCoder, on 21 Nov, 2008 - 04:47 PM, said:

One major downfall with C# over Java and C++ is with a C# application the .Net framework has to be installed on the target machine, and it isn't cross compatible with other OS's, whereas C++ and Java are


the Mono project has allowed .Net apps to run on Linux.
Was This Post Helpful? 0
  • +
  • -

#8 badjava  Icon User is offline

  • Lux Ex Tenebris
  • member icon

Reputation: 14
  • View blog
  • Posts: 540
  • Joined: 30-October 08

Re: What can't you do with C#?

Posted 24 November 2008 - 05:51 AM

View Posteclipsed4utoo, on 23 Nov, 2008 - 08:05 AM, said:

View PostPsychoCoder, on 21 Nov, 2008 - 04:47 PM, said:

One major downfall with C# over Java and C++ is with a C# application the .Net framework has to be installed on the target machine, and it isn't cross compatible with other OS's, whereas C++ and Java are


the Mono project has allowed .Net apps to run on Linux.


is it 100% compatible? That would be pretty impressive to me at least. :)
Was This Post Helpful? 0
  • +
  • -

#9 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1525
  • View blog
  • Posts: 5,961
  • Joined: 21-March 08

Re: What can't you do with C#?

Posted 24 November 2008 - 07:13 AM

View Postbadjava, on 24 Nov, 2008 - 07:51 AM, said:

View Posteclipsed4utoo, on 23 Nov, 2008 - 08:05 AM, said:

View PostPsychoCoder, on 21 Nov, 2008 - 04:47 PM, said:

One major downfall with C# over Java and C++ is with a C# application the .Net framework has to be installed on the target machine, and it isn't cross compatible with other OS's, whereas C++ and Java are


the Mono project has allowed .Net apps to run on Linux.


is it 100% compatible? That would be pretty impressive to me at least. :)


100%? no. In Mono 2.0, they now support everything that .Net 3.5 supports EXCEPT the 3 foundations(WCF, WPF, WF).
Was This Post Helpful? 0
  • +
  • -

#10 badjava  Icon User is offline

  • Lux Ex Tenebris
  • member icon

Reputation: 14
  • View blog
  • Posts: 540
  • Joined: 30-October 08

Re: What can't you do with C#?

Posted 24 November 2008 - 07:34 AM

View Posteclipsed4utoo, on 24 Nov, 2008 - 06:13 AM, said:

100%? no. In Mono 2.0, they now support everything that .Net 3.5 supports EXCEPT the 3 foundations(WCF, WPF, WF).


I'm too much of a noob to know what that means yet :rolleyes: My C# experience so far is a couple of videos, a couple of intro chapters, and the hello world app.

I have a question about what C# CAN do, hopefully I can toss it in here without needing to start a new thread.

A project idea for a widget'ish application to help advance my learning of C# needs to basically be able to intercept text being displayed in any running windows from other programs or browsers etc. and shift all of the text and characters being displayed to bolded text. Maybe a better way to look at it would be for the C# program to override all system display font settings and turn the changes on or off real time.

Does this sound like something that is possible in C#? I'm not looking for anyone to tell me how to do it, just if they think it is feasible, and I guess a tip or two for research direction wouldn't hurt either :)

What do you think?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1