James Alexander
James Alexander

Reputation: 6312

How do I convert a byte array represented as a string into a byte array?

In SQL Server, a varbinary(max) looks like '0xFE12CE34AB27' when looking at query results in a grid result within Management Studio. How can I copy a value looking like that and convert it back into a byte array via C#?

Upvotes: 0

Views: 661

Answers (1)

Henk Holterman
Henk Holterman

Reputation: 273621

The '0xFE12CE34AB27' string you see is an artifact of the Mgmt Studio.

Your data already is a byte array, don't do anything.

Upvotes: 1

Related Questions