Access Modifiers for Typed Datasets

G

Guest

Greetings!

I have need of sharing a typed dataset between two projects (one for UI and one for a class library) and have encountered a "problem". By default, the classes generated for a Typed Dataset do not use the access modifiers that I need /would like (e.g. Column properties are declared as Friend). I know that certain annotations exist to allow you to change names and even how dbNull values are handled, but I have yet to see anything that addresses the access modifiers. Does anyone know if there is such an annotation? Or... any other technique that would allow me to fully share a typed dataset between multiple projects (other than the "just edit the generated code" technique)?

Thanks for any and all help!
 
M

Miha Markic [MVP C#]

Hi,

Yes, columns are internal of friends and I hate it :)
However, only strong typed column accessors are internal.
You can still use table.Columns[index] thing.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

GregC said:
Greetings!

I have need of sharing a typed dataset between two projects (one for UI
and one for a class library) and have encountered a "problem". By default,
the classes generated for a Typed Dataset do not use the access modifiers
that I need /would like (e.g. Column properties are declared as Friend). I
know that certain annotations exist to allow you to change names and even
how dbNull values are handled, but I have yet to see anything that addresses
the access modifiers. Does anyone know if there is such an annotation?
Or... any other technique that would allow me to fully share a typed dataset
between multiple projects (other than the "just edit the generated code"
technique)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top