Error CS0227 Unsafe Code BytesConverter

hawkeyetim

Member
Licensed User
Longtime User
Hi All
I am hoping someone can help me am writing a program that uses Agraham ByteConverter 1.4 which was working and compling with no issuses but after i redownloaded the dll package because i wanted to look at the examples programs Agraham had included, now everytime i try to compile i get the following error

External Compiling error
Error compiling program
c:\program files\anywhere software\basic4ppc desktop\libraries\bytesconverter.cs(508,25): error CS0227:Unsafe code may only appear if compiling with \unsafe

Ive tried re-downloading and installing the dll a few times and ive also re-installed basic4ppc but nothing helps i even get the error on a blank program with only the byteconverter dll added to the components list.
Has anyone else seen this issue or know how to solve it.

Thanks in advance
 

agraham

Expert
Licensed User
Longtime User
Sorry, I overlooked the implication for merging when I added the Union object and forgot to add a line in the cs file. You can either delete the cs file from your libraries folder and just use the dll unmerged or you can edit the cs file and put the following line as the second line.


//version: 1.4
//unsafe
#region Using directives

EDIT :- Version 1.4a now posted includes the amended source file.
 
Last edited:

hawkeyetim

Member
Licensed User
Longtime User
Thanks for the quick reply AGRAHAM i deleted the cs file and all works.:)

Thanks Again
 
Top