Solved

C# Binary Data to integer

Posted on 2014-09-22
4
128 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
  • 2
  • 2
4 Comments
 
LVL 78

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 78

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Windows Service with UDP 2 28
SQl help with selection 14 44
String manipulation 15 49
How to use xmlReader and idatareader  ? 4 45
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now