C# New Brep

I’ve just made sure that I’ve referenced the latest version of RhinoCommon (v2.0.50727)

When I try to create a new brep ‘Brep b = new Brep()’ I get the following error:

‘Rhino.Geometry.Brep.Brep(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)’ is inaccessible due to its protection level

Am I doing something silly?

Hello Hugh_Groves1,

Where did you delcare the brep? Is it in your ___plugin where you can change the plugin behavior?

Because I use vb.net and it works with:

Dim b As Geometry.Brep = New Geometry.Brep()

but both use the same library.


It seems to think I’m trying to call the protected constructor used in serialization, but I’m declaring it with no arguments so it shouldn’t think that!

What did you use as Imports?

D’oh, so silly. Referenced 32bit version of RhinoCommon, when launching Rhino 64bit version.

Panic over!