|
The short answer to this very common question is no. You can't prevent a .net application or assembly from being decompiled. The best you can do is use an obfuscator to cloud the issue a bit.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
In one of my projects I have used the following technique:
some function bodies were encrypted, and the IL in it was decrypted on-the-fly, just before you enter into this function.
You can implement something like it too, it's not too hard.
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
|
|
|
|
|
Why don't you submit an article on this technique. I'm sure others would find it interesting.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You can also try using a type name longer than 4096 characters, it messes with some reversing tools..
|
|
|
|
|
Are you a developer I would fall out with? Types with names longer than 4096 characters. It wouldn't just be decompilers it would mess with.
|
|
|
|
|
It wouldn't have to be in the source, just in the assembly
And the C# compiler sets a maximum length of 512 characters anyway..
|
|
|
|
|
Trying is generally not worth the trouble.
|
|
|
|
|
You can go for "WinLicense" software to protect and manage license of your .NET code.
See details from following link.
http://www.oreans.com/winlicense.php[^]
Hope this will help!
Jinal Desai
|
|
|
|
|
Hello guys!
Has anyone seen any SGML validator for .NET (or, maybe, a .NET wrapper for Windows OpenSP: http://openjade.sourceforge.net/[^])?
I've tried to find it but there was no result :(
I have managed to find only a wrapper for Tidy html validator but it's not what I'm looking for, it's another validator.
Thanks in advance.
Die Energie der Welt ist konstant. Die Entropie der Welt strebt einem Maximum zu.
|
|
|
|
|
I write to inquire about a knowledgebase or its equivalent for those interested in integrating .NET development with the ARC GIS mapping applications beyond the APIs. Much thanks for any informed guidance.
|
|
|
|
|
I've known about Generics for a while, but never really took the time to review. I've recently began taking a look at them and have been trying to determine when they should be used. It seems I can do the same things using inheritance. I was just wondering about everyone's opinion on this topic.
Do you prefer one technique over the other and why?
What scenario would a Generic be a better choice than an inherited class?
Thanks.
|
|
|
|
|
Generics and Inheritance are two completely different animals. Inheritance is of course used for OO where you can have a base class with some characteristics and actions that can be used in any derived classes. The classical example is and Animal base class and Cat or Dog derived classes.
Generics give you the ability to write one class or method that can execute actions in a generic way. For instance;
public class MathOperations
{
public T Add<T>(T x, T y)
{
return x + y;
}
}
In this case you can call Add with int, float, decimal, etc. and it will add the values together. Otherwise you would need to create an override for the Add method that takes, int, float, double, etc., much more coding.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Looks like a <T> got eaten by the hamsters
|
|
|
|
|
Guess Bob got hungry
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Can't compare one with other. Inheritance is used in Object Oriented Programming and Generic is used in Generic Programming. One can't replace the advantage of one with other.
Personally i perfer to use Generic for utility classes such as vector, array, map, list etc and inheritance for contract. What does it means, with the help of inheritance, i want to make sure that we uses the appropriate level of classes.
Take a look at the following example
class Building
{
}
class ResidentialBuilding : Building
{
}
class RentedResidentialBuilding : ResidentialBuilding
{
}
class ApartmentBuilding : RentedResidentialBuilding
{
}
class LuxaryApartmentBuilding : ApartmentBuilding
{
}
Now if i want to give some functionality of Apartment then i would do something like this
void ApartmentName(const ApartmentBuilding& apartment);
This way i will make contract, with the help of inheritance, that only apartment and its inherited class can be used with this function. We can't do exactly the same with Generic.
Similarly we can't do everything which generic offers with inheritance alone. The other answer already explained it.
|
|
|
|
|
|
Picture a bath. A conical bath. Film fine white sand running out of it. Now run the film backward.
|
|
|
|
|
I have a solution with 10+ projects. Most of the projects are 100% .net 2.0. However one of the projects references a .Net 3.0 DLL. The solution compiles fine in VS2008, but will not compile with VS2010, because of the mixed frameworks. We may be able to upgrade to .Net 3.5, but that will be later on. Has anyone else found a solution to this issue? Currently the solution is in VS2005.
GSC
|
|
|
|
|
gscheek wrote: will not compile
and what does that mean?
|
|
|
|
|
When trying to compile the solution, it contains 1000+ errors. VS2008 compiles fine with no errors.
GSC
|
|
|
|
|
really? that is horrible. I haven't been playing with VS2010 myself but that is not the behavior I expect, nor what I gathered from reading lots of posts in the Visual Studio forum and Lounge.
Do you have .NET 2.0 installed? (yes the Framework itself, not VS2008).
|
|
|
|
|
I've converted many projects from VS2008 to VS2010 and have not had any issues. Are they warnings or errors? What some of the errors you are experiencing?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
gscheek wrote: but will not compile with VS2010, because of the mixed frameworks
That really should not be the case.
When you opened the solution in 2010, did the conversion happen correctly?
|
|
|
|
|
When converting from 2005 - VS2008, it worked fine. But when converting the 2005 solution to VS2010, there was a warning for each project. The warning message was that the project is targeting 2.0 framework, but contained references to 3.0 .net dll's. If VS2008 didn't have an issue with this, why would VS2010.
Also, I have VS2005, VS2008, and VS2010 installed on the same machine.
Exact warning message from VS2010, it done this for several of the projects in the solution file.
Your project is targeting .NET Framework 2.0 or 3.0. If your project uses assemblies requiring a newer .NET Framework, your project will fail to build. You can change the .NET Framework version by clicking Properties on the project menu and then selecting a new version in the '.NET Framework' dropdown box. (In Visual Basic, this is located on the Compile tab by clicking the 'Advanced Compiler Options...' button.)
GSC
modified on Thursday, April 29, 2010 10:08 AM
|
|
|
|
|
gscheek wrote: Your project is targeting .NET Framework 2.0 or 3.0. If your project uses assemblies requiring a newer .NET Framework, your project will fail to build. You can change the .NET Framework version by clicking Properties on the project menu and then selecting a new version in the '.NET Framework' dropdown box. (In Visual Basic, this is located on the Compile tab by clicking the 'Advanced Compiler Options...' button.)
Did you try this?
|
|
|
|