• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 161
  • Last Modified:

C# Binary Data to integer

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
Idarac
Asked:
Idarac
  • 2
  • 2
1 Solution
 
David Johnson, CD, MVPOwnerCommented:
you have to read it as it is stored and then you can cast it into what you want.
0
 
IdaracAuthor Commented:
Can you give ma idea of the syntax?
0
 
David Johnson, CD, MVPOwnerCommented:
 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
 
IdaracAuthor Commented:
Thanx....
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now