Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization of string #32

Open
puschie286 opened this issue Jun 21, 2022 · 0 comments
Open

Serialization of string #32

puschie286 opened this issue Jun 21, 2022 · 0 comments

Comments

@puschie286
Copy link

Hi,

the readme says that binarypack supports primary types like string but i dont get it to work with string.
it work very well for all other types but string seems to be the only exception

my approch was:

byte[] serialize = BinaryConverter.Serialize( "test" );
string back = BinaryConverter.Deserialize<string>( serialize );

which doesnt compile because of Error CS0310 : 'string' must be a non-abstract type with a public parameterless constructor in order to use it as parameter 'T' in the generic type or method 'BinaryConverter.Serialize<T>(T)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant