Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can .NET code compiled with the unsafe tag run in Mono?

I have some code that does Bitmap manipulation using the LockBits method and accessing the bitmap data directly using a pointer. This code has to be wrapped in an unsafe block, of course, and I was wondering if this means that the code would not work in Mono.

I'm assuming the Bitmap class is available in Mono, but maybe that's another deal-breaker.

like image 976
MusiGenesis Avatar asked Jun 01 '09 02:06

MusiGenesis


2 Answers

Yes. Here's the Mono documentaiton on the unsafe keyword: http://go-mono.org/docs/index.aspx?link=ecmaspec%3A25

The Bitmap class is available as well. You can find the documentation here: http://go-mono.org/docs/index.aspx?tlink=35@ecma%3a1990%23Bitmap%2f. Just like in .NET Bitmaps inherits Image, which is nice.

like image 144
Esteban Araya Avatar answered Sep 24 '22 18:09

Esteban Araya


Yes it can, and Mono has the Bitmap class.

like image 26
arul Avatar answered Sep 23 '22 18:09

arul