17

Does anyone has the list of conversion from MySQL data types to C# data types ? I'm having difficulties when tried to convert from smallint unsigned type into c# type.

1 Answer 1

13

You can use the following table for conversion from MySql to C#.

MySQL -> C#

char(x) = string
datetime = DateTime
varchar(x) = string
smallint = short
smallint unsigned = ushort
int = int
int unsigned = uint
bigint = long
tinyint = sbyte
tinyint unsigned = byte
bigint unsigned = ulong
text = string
Sign up to request clarification or add additional context in comments.

1 Comment

Datetime conversion will give an error, besides what is your source for this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.