2

Im using an open source code from EvilDicom. Unfortunately, these codes are in VS2010 and they use the namespace System.Numerics and Microsoft.CSharp. I would like to know if there are equivalents of these namespaces in VS2008? My application is built in VS2008 and hence i'm trying to build in 2008.

CharlesB
  • 86,532
  • 28
  • 194
  • 218
user877852
  • 105
  • 1
  • 16
  • http://msdn.microsoft.com/en-us/library/system.numerics.biginteger.aspx http://stackoverflow.com/questions/4820953/where-is-my-system-numerics-namespace – rahularyansharma Oct 05 '11 at 05:07
  • @rahularyansharma i dont think i can use that, as the question is based on usage in VS2010, whereas i'm looking at VS 2008. Thanks! – user877852 Oct 05 '11 at 06:05

3 Answers3

0

MSDN says Microsoft.CSharp namespace is available for earlier frameworks. Make sure you have added references to System.Core.dll and System.Dynamic.dll.

enter image description here

Where as System.Numerics Namespace is new for .net framework 4.0. Finding an equivalent depends on what you are using in that namespace. I am not sure whether there are any equivalents for BigInteger and Complex structures...

CharithJ
  • 46,289
  • 20
  • 116
  • 131
0

System.Numerics namespace was added in .net 4.0 and there is no equivalent namespace in lower versions of .net. If you have access to source code of this program and are willing to change it you could try to modify it to use IntX library as a replacement for BigInteger if license is proper.

CharlesB
  • 86,532
  • 28
  • 194
  • 218
wiero
  • 2,176
  • 1
  • 19
  • 28
0

The only way the System.Numerics namespace is used is in the UIDHelper class to convert a GUID to a decimal number. It essentially writes out a 16 byte integer, created from the bytes of a GUID, as a decimal number.

I don't know how important this value is. You have two options:

  1. You can replace this code with similar code that does not use the BigInteger type but is good enough for your purposes.

  2. You can implement the BigInteger type yourself. There are several implementations, including in the .NET Framework itself, in the J# class libraries (See http://msdn.microsoft.com/en-us/magazine/cc163696.aspx).

Jeffrey Sax
  • 10,253
  • 3
  • 29
  • 40
  • Hi, @Jeffrey i do have a UIDHelper in my code. I dont think the first option is feasible as it probably wont be efficient enough (i guess, not sure!). Thanks for the second link, i'm going to look into it! :) – user877852 Oct 05 '11 at 06:21
  • i was looking at my code, and i dont think i would need the UIDHelper and i guess now i wont need System.Numerics too. But when i build my solution, i get errors saying: system missing an assembly reference, even though my namespaces are all present. Im guessing this is because the code is using VS2010 namespaces whereas i'm using 2008. Any idea how i could go about from here? Thanks! – user877852 Oct 05 '11 at 06:38
  • You should be able to just remove the references to System.Numerics and Microsoft.CSharp in Solution Explorer. I think Microsoft.CSharp was added to support the new `dynamic` keyword in C# 4.0. – Jeffrey Sax Oct 05 '11 at 06:44