开发者

Usage of System.Numerics in VS2008

开发者 https://www.devze.com 2023-04-10 13:24 出处:网络
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 开发者_StackOverflow中文版

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 开发者_StackOverflow中文版there are equivalents of these namespaces in VS2008? My application is built in VS2008 and hence i'm trying to build in 2008.


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).


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

Usage of System.Numerics in VS2008

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...


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消