Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
How to convert a Byte Array to decimal value and vice versa in c# 4.0 framework
Swapnasagar Panda
12y
1.2k
1
Reply
How to convert a Byte Array to decimal value and vice versa in c# 4.0 framework.
The following code working in 2.0 and 3.5 , but giving exception in 4.0:--
byte[] bytearray = new bytearray[16];
MemoryStream m2 = new MemoryStream(bytearray);
BinaryReader reader = new BinaryReader(m2);
decimal dec = reader.ReadDecimal();
Console.WriteLine(dec.ToString());
Console.ReadLine();
m2.Close();
reader.Close();
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Selecting all the rows based on distinct column value
problem on binding data to combo box