0

I have come across many c# libraries and many say their libraries are written in pure c#. Why is this an advantage over other libraries.

Luke101
  • 63,072
  • 85
  • 231
  • 359
  • 6
    What do you mean? – Lion Jul 21 '13 at 19:35
  • I suppose one benefit is that you don't have to deal with interoperability issues, or have several different build tools and maintenance scripts. It depends, of course, on what you're doing. – siride Jul 21 '13 at 20:14

2 Answers2

8

With no external dependencies it could "in theory" be run in another environment where C# is supported - e.g. mono.

Craig Shearer
  • 14,222
  • 19
  • 64
  • 95
8

The advantage is the libraries are not tied to any architecture (x86/x86_64/...). This is a plus because:

  1. The library can be easily recompiled under x64/x86/Any CPU if you have the source (and sometimes if you do not). Recompiling native code is much more difficult.
  2. The library can be run on non-x86 devices like ARM Microsoft Surface tablets. This means, you can have your application portable between desktop/tablets easily.
  3. As was already pointed out, you can run your code under Mono on Linux or under some other version of the .NET Framework like .NET Micro Framework (with limitations, of course).
DarkWanderer
  • 8,739
  • 1
  • 25
  • 56