Solved

C# Binary Data to integer

Posted on 2014-09-22
4
143 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

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…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 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