This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Best .NET obfuscation tools/strategy
Should you obfuscate a commercial .Net application?
Good day everyone.
I'm ready to release a small c# game, but I've heard that it is extremely easy to disassemble/decompile c# application if it is "deployed" as it is. So my question - what can I do to prevent, or at least make it harder for people to disassemble/decompile my application?
Is there more then one way? If so, what do you think is best?
UPD: As was pointed below using default obfuscator might pose some problem with reflections, because I use lua interpreter for ingame scripts.
Thanks in advance.
Visual studio contains the "Dotfuscator" (Tools->Dotfuscator Software Services in VS 2010) which obfuscates your code for you. It can pose certain problems if you implement reflection in your code, but it does give you options as to what you want it to do to your code, so there is some flexibility there as well.
Related
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
FindBugs for .Net
I need something like FindBugs for C#/.NET ...
Could you tell me where I can find something like this ?
Thanks.
FxCop is a static analysis tool for .NET that has the ability to detect various possible bugs as well as advise you of good programming practices and Microsoft naming conventions. It seems like Microsoft have stopped development on the standalone FxCop tool now in favour of encouraging you to buy a version of Visual Studio with the static code analysis built in (which I think for VS2010 is the "Premium" edition and above).
You might want to have a look at FxCop. It's probably the most popular static code analysis tool for .NET.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have been developing applications using VB.net for the past 5 years. As I tried to learn Java earlier and found it very difficult for me I did stick on to VB.net. And for me C# is more or less similar to Java.
Now I cannot get away with it. I have to code on C#. Is there a way I can get to speed with C# fast. I would really appreciate if you can let me know your thoughts and if there are any good resources I can try.
If you have been doing VB.NET for that long then the underlying OOP concepts in that language and your experience with the .NET Framework put you in an excellent position to learn C# quickly. This means all you really need to learn is a new syntax and the best way to do that is to practice.
First, don't panic. The syntax is slightly different, but in my experience, most people that I've worked with who have been developing in VB.Net are able to get over that and get up to speed in a week or so.
The main thing to remember is that they are both .NET,and it's the .NET Framework and the Class Library that do all the work. It's not like Java where you would have to learn a whole new set of libraries. In C#, a System.Text.StringBuilder is the same System.Text.StringBuilder you would use in VB. The learning curve really isn't that bad if you keep this fact in mind.
Plus, if you're using the MSDN library, there are examples in both languages in almost every case, so you can pick up a lot of the differences just by using the examples.
I find language translators useful:
http://www.developerfusion.com/tools/convert/vb-to-csharp/
I am working on a presentation & want to include both VB.NET and C# code. If I don't know how to translate something from C# to VB.NET, I dump the code into the translator and I learn.
I have relearned VB.NET stuff that I have since forgotten. I'm sure that it will work the other way around.
You can try http://converter.telerik.com/ far better than conversion engine of DeveloperFusion.
I think the best way would be probably buy a book on 'Learning C#' ... why? Because its a structured approach.
You'll fly through the book because you already understand programming concepts such as data types, loops etc.
I find Wrox books are great for these topics:
http://www.amazon.co.uk/Beginning-Microsoft-Visual-2008-Guides/dp/047019135X/ref=sr_1_1?ie=UTF8&s=books&qid=1273327223&sr=8-1
Depending how serious you are, you could also purchase the 'Professional' edition by Wrox for more complex parts of C#.
I prefer the book option because its route through the langauage... the only other way would be to keep researching on google/msdn on to find out how to do things in C#... which might get annoying and tiresome.
As others have said, once you have a good grasp of C# you will be able to reopen your older VB.NET projects and actually convert them to c# with ease.
HTH
Actually, if you've been doing VB.NET for last couple of years the transition shouldn't be as hard as you make it out since the language are very similar. You just have to look at the tons of online C# to VB.NET code translators that are available for evidence. Well several years ago when I was porting over VB.NET to C# code the main things it would choke on was arrays since syntax is different enough and case sensitivity since VB isn't case sensitive. Nowadays, there might be more problems though will all the additions they keep adding to C#.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
My background: Mostly C programming. I have some (very recently...last 2 months) acquired JAVA (novice) skills. All my limited experience is based on developing for linux.
I would like to do some excel programming for work purposes. My main interest is in starting to create "dashboards" and charts/reporting from excel sheets as I'm sick and tired of updating many sheets by hand. I'm lazy so I love to automate wherever I can :-)
Which one of these "new" languages (for me) would you recommend to learn? I'm also hoping that if/when I'm getting more familiar with Windows/MS Office environment I can do more "powerfull" things.
If your main goal is to optimise your Excel tasks, then VBA is the language to learn.
The good thing is that if you have any programming background the learning curve is extremely straightforward.
Just run "Record Macro", perform a task, then look at the code that was generated. You've got a working example to learn from.
I personally prefer C# as a language, but in terms of released versions, VB.NET is a better language to use for Office interop. C# 4 has improved this situation a lot though, with named arguments and optional parameters, ref argument faking and COM PIA linking.
If you can use C# 4, that might be the best option for you - but if you're stuck with fully released versions, you might want to go for VB.NET instead.
If you want to dig straight into excel automation, I'd stick to VBA. If you're more interested in extending your knowledge, I'd choose one of the .NET languages, probably VB.NET.
C# seems to be more prestigious/popular, but it's also closer to what you already know. If you learn the .NET Framework using VB, that and your C/java syntax means you'll be able to read C#. It would also give a smoother transition to VBA if you change your mind.
Since you know Java & C, C# should be the easiest to learn. More jobs for C# skills too, if that's important to you.
All of the answers given are sensible, but I'm not sure they're realistic. Yes, Microsoft have been wanting to get rid of VBA for some time now, and I'm sure they dearly wish that Visual Studio Tools for Office would take off; and yes, VB.NET and C# both support something called classes (using object-orientated programming) much better than VBA does.
HOWEVER ... the world uses VBA! Particularly for Excel solutions, I'd guess about 99% of all systems ever written use VBA. So personally I'd learn VBA, helped by the fact that:
You can record macros to see how to do things; and
It's built into Excel (no need to buy or install any other software).
I've written a VBA tutorial online which I hope will help, full of example code and diagrams. Let me know what you think of it, if you should use it.
PS It might seem that my advice is somewhwat biased, but it isn't. We train on VSTO, C# and VB.NET, and my personal preferred programming environment by some way is Visual Studio (VBA drives me mad when I have to revert to it now). However, that's the result of nearly 20 years of learning! For a new programmer, VBA is much simpler to learn.
Microsoft plans to get rid of VBA sometime in the future. Support was already dropped from the Mac version of Office 2008 for example. It way stay around in the Windows version for some time, but no significant new development will be done on it.
Seeing you have C and Java knowledge, and considering you're starting fresh, I'd definitely go with .NET. It's simply the better investment for your time.
Like Jon Skeet says, C# (4.0) is probably your best option if you don't mind using beta software.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I have about 4-5 years of background in programming some in C# and some in C++. I recently got an internship and have been using C# daily. I am confident in my work, and don't have any problem remembering syntax or anything like that. So I was wondering what you think about getting resharper? I was going to demo it first but I just want to hear other opinions about it. Basically what I'm trying to ask is, should I wait to get it and become more experienced and have more practice with just Visual studios and its built in intellisense and stuff or would it be alright to get it?
I wouldn't work without it. It duplicates a bunch of the Visual Studio stuff, and adds a whole lot more. It simply improves Visual Studio, and will not impair your learning c# at all.
I'm a developer that has been using C# since .net 1.0 days on a daily basis, I usually likes to keep to the bare bones of an installation, so that if my dev environment is somehow destroyed I can be back and running as fast as possible. However, I recently did some pairing with another developer which required installing Resharper. What I found was:
I learnt alot about C# features I never new existed.
It had a much better test runner than VS.
Had much better refactoring tools.
About the only thing I didn't like was that it rearranged some of the default VS keyboard shortcuts, however after a bit of tinkering in the options dialog I was able to turn off the features I didn't need.
I'm missing it now, after the trial. I'm unfortunately unable to afford the cost of a licence (cash flow problem, not a it isn't worth it problem) at present and can't convince my bosses to get it for me.
Make a point of trying out Refactor Pro and CodeRush during your research as an alternative to Resharper. Together they're an unstoppable productivity machine. I used them for years when I developed in C# and working without them feels like I'm missing an extra me. :-)
For sure you should look into both products, though. It's not about remembering syntax, it's about reducing the number of coding errors that everyone makes all the time.
I can tell you from my experience that no matters how solid are your skills ReSharper is quite addictive, and it's a great enhancement for C# programming in VS. In fact the addiction comes from the fact that it can really make you save a lot of time otherwise spent doing tedious tasks and at the same time it'll help you write clean code which turns in less time spent refactoring (which is made faster by ReSharper anyway).
If properly configured, it can be - in my opinion - the most valuable VS addin and I couldn't really see why you should deny yourself access to that :)
Well worth the money, particularly if you can get your company to buy it for you. I theoretically could work without it, but I wouldn't want to.
Resharper is like learning piano chords and then being able to play any song you hear. You can write code the "wrong" way, highlight some of it, do a key combination, and clean it up.
v4.5 makes huge strides in performance as well. Some big solutions would get bogged down, but this one is a lot snappier. It's solid top to bottom.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have just moved job and gone from VB 6 to VB.Net and found the learning jump fairly steep, have more a problem with the object / conceptual side of things .. but getting there now ... but as I was a assembler / C++ 10/15 years ago and was considering learning C++/C# .Net (XNA games library calls my name) but not sure if it would hinder my VB.NET learning .... or should I just get myself certified
I was (back in the day) a VB6 dev, and I would expect it to help. There is a much-commented tendency for VB6 developers to keep writing VB6 in .NET; even just a brief look at C# might help you think about VB.NET as a .NET language, rather than a Visual Studio 6 ancestor.
Of course, you might find (as I did) that you don't want to go back to VB.NET after C# ;-p
But as has already been mentioned - the framework is identical. And with C# 4.0, many of the differences will become even less (with "dynamic" making it easier for C# to talk to late-bound COM, and the named arguments / auto-ref stuff making it easier for typed COM).
There is a lot of drive for converging the feature sets of C# 4.0 and VB.NET in VS2010
To me the biggest obstacle for .NET is learn what is available in the framework. Therefore, if you find it easier to code in C# it will mean you only struggle with one thing instead of two. Once you know the framework it's just syntax really as 95% of the stuff you can do with C# can be done with VB.
Also, C# will force you to write code in a more object orientated manner as you can't fall back to coding in a VB6 style.
'yield return' is an example of something that doesn't have an equivalent in VB9 (there are rumours this is being added for VBX though).
Apart from the fact that a large part of what you need to know is about the Frameworks's libaries learning another syntax that targets the .NET's CLR is useful.
Seeing how another language expresses the same concepts helps you to separate the concepts from the language. This is always useful because the concepts are fairly constant, (for example a shadowed(VB) or hidden(C#) function) whilst different languages use different words to express them.
Understanding the concepts better will help you to utalise them when designing code.
IMX, learning C# helped me with learning VB. It's something about seeing the same concepts expressed in 2 ways rather than just 1.
EDIT: Anthony Jones beat me to it :-)
Well for one thing if your method does not return anything then you have to create a Sub in VB.NET and if it returns anything then call it a Function!
I just switched from C# to VB.NET (client requirement) and am still getting used to its nuisances :(
I would say coding in VB almost takes the OOPS out of .NET
I was also a VB6 developer before switching to .NET. First I tried to use VB.Net but it never felt comfortable so I tried C# and fell in love with it. :-)
There are some differences as noted in the previous replies, there are things you can do in VB.Net that you can't in C# (like indexed properties) and vice versa. But apart from that the differences are purely in the syntax. There are in fact several available translators that will convert C# to VB.Net and back.
So I would recommend you to try out C#. Since you know some C++ it shouldn't be very hard to get the syntax right, and the rest is learning to use the framework.
The only real hindrance learning C# would have to VB is documentation. There seems to be a lot more information out there for C# users and trying to find the VB equivalent syntax of sometimes pretty standard C# can be a pain.
That being said... it never hurts to know alot of different ways to do the same thing.
I agree with Garry, the biggest issue is the API.
The second biggest issue I have personally observed is VB6 developers writing VB6 code in VB.NET. That's a good reason in itself for VB6 developers to learn C# - it forces you to think in .NET style.
As a devoted .Net developer I have worked on big projects in both C# and VB.net. Having seen the strengths and weaknesses of both languages I have found VB to be the most frustrating at times.
The problem is that with VB (depending on your project settings) it will magically perform implicit operations such as casts. This can be helpful sometimes, but in the general case you do not want your code to do something unless you explicitly tell it to (this is how C# behaves, in an explicit manner). I would prefer a compiler time error to tell me I cannot convert from one object type to another rather than a runtime exception in our live deployment.
I have found that this implicit aspect of VB tends to hamper the "VB only" developer's understanding of what is going on behind the scenes. For these people, looking at C# seems to trigger some lightbulbs, where they say "aha!, that must be what VB is actually doing when I perform this operation".
I'd recommend you give C# a try, it'll give you a new perspective and you might find that you really like it.