I have 'bit' datatype in db. I convert its equivalent datatype to 'bool' in c# when i declare.

protected bool e_Status;

And when I set the property for the above,

public bool Status
{
 get { return e_Status; }
 set { e_Status = value; }
}

Now how do I do the samething for 'varbinary(MAX)' type in db to its equivalent in c#? and how do I set the property for it like above?

Recommended Answers

All 3 Replies

Use a byte array (byte[]) and then work with it using streams (memory, file...).

@TnTinMN thank you. That was helpful

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.