Solved

C# Binary Data to integer

Posted on 2014-09-22
4
140 Views
Last Modified: 2014-09-23
I have a field in an SQL Server table.

I need to read the binary field into an integer or string variable.

Using C#

Help please.
0
Comment
Question by:Idarac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 81

Expert Comment

by:David Johnson, CD, MVP
ID: 40337362
you have to read it as it is stored and then you can cast it into what you want.
0
 
LVL 1

Author Comment

by:Idarac
ID: 40337381
Can you give ma idea of the syntax?
0
 
LVL 81

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 40337769
 static void Main(string[] args)
        {
            int MyInt = 32;
            string strMystring = MyInt.ToString();

            Console.WriteLine("My int = {0}",MyInt);
            Console.WriteLine("My String = {0}",strMystring);
            Console.ReadLine();

Open in new window

0
 
LVL 1

Author Closing Comment

by:Idarac
ID: 40339985
Thanx....
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question