Jump to content
  • Advertisement
Sign in to follow this  
Rich76

[.net] C# and C++ in .NET the same?

This topic is 3667 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I read some where that all .NET apps are the same once compiled, so it basically comes down to choice of language. Is this true? I read that C++ was faster, how can it be any faster with .NET? Also, can .NET apps be decompiled?

Share this post


Link to post
Share on other sites
Advertisement
The Visual C++ compiler does more aggressive optimization than that C# one (simply because it's more mature). When you compile with the /clr switch, the C++ compiler does emit MSIL which is "the same" as what the C# compiler emits.

.NET apps can be decompiled, yes. Reflector is the most well-known tool for doing it. It's even got add-ins that'll generate the complete project file and everything for you. There are also obfuscation tools that will let you obfuscate the generated IL bytecode, but they can only do so much...

Share this post


Link to post
Share on other sites
Quote:
Original post by Rich76
Thank you. :)


So, there is now way to keep someone from stealing your code with .NET?


I'm no expert but...

Only as much as there is a way to stop someone stealing your C++ code. All code is reversable, it just depends on how much time and effort the hacker is willing to put into it.

There are some really good obsfucation tools for .net that require very crafty hackers to be able to get the MSIL code. It's not impossible, it just reduces the number of average Joe hackers that will actually succeed. But it only takes one to put your app on a torrent site.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rich76
Thank you. :)


So, there is now way to keep someone from stealing your code with .NET?

Don't protect your code by trying to be clever, protect it with the law. Wins every time :)

Share this post


Link to post
Share on other sites
Quote:
Original post by Jroggy
...protect it with the law. Wins every time :)


Except for the millions of games downloaded via torrents every day.

Share this post


Link to post
Share on other sites
Quote:
Original post by Spodi
Quote:
Original post by Jroggy
...protect it with the law. Wins every time :)


Except for the millions of games downloaded via torrents every day.


That's a different situation. We're talking about protecting the source code by obfuscation, not stopping people making copies of your program.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!