Is there any way to convert .dll file to .cs files? I am searching for any tool or online website what can convert .dll file into .cs files. If any one have any info please inform Thanks in advance.
-
2DLL files don't contain their source code. The best you can do is use a decompiler. Assuming you have the licence to do so, of course. – Luaan Dec 08 '16 at 12:16
-
1Have a look at http://stackoverflow.com/questions/4706377/how-do-you-extract-classes-source-code-from-a-dll-file – MakePeaceGreatAgain Dec 08 '16 at 12:18
-
1Read [ask] and share your research. – CodeCaster Dec 08 '16 at 12:22
3 Answers
No, in general, that's not possible (in any compiled language).
You can decompile binaries for .NET into CIL (Common Intermediate Language), which is an object-oriented assembly language. Various .NET languages (C#, F#, Visual Basic, etc.) are compiled into the bytecode, which is then being executed by the .NET virtual machine rather than by the processor.
Thanks to that the .NET bytecode is platform independent, it can be executed on any platform for which the .NET virtual machine exists without the recompilation.
You can decompile the .NET binaries into CIL using for example these free decompilers:
- ILSpy (standalone or as a Visual Studio extension)
- JetBrains' dotPeek
- Telerik's JustDecompile
dotPeek has a feature to decompile any .NET binary into equivalent C# code, but it's not same as the original C# code.

- 23,966
- 9
- 79
- 68
-
-
ILSpy does not work properly, I does not recover namespace blocks. Telerik worked well. – Jitendra Pancholi Sep 01 '18 at 07:03
-
ILSpy works for me. I've added the [VS Extension](https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.ILSpy). It's simple and free – Senura Dissanayake May 15 '19 at 04:53
You can use this http://ilspy.net/, it is a really good tool will convert you dll to .cs files

- 54
- 3
You can try anyone of the third party decompilation tool to get your code from dll.
One of the most recognized: .Net reflector tool.
NOTE: You can convert it only to MSIL (Intermediate Language):

- 1,388
- 2
- 25
- 42