I use a strongly typed DataSet for which manually adding rows will be error prone. I provide factory methods for creating strings correctly. I would like to direct the users of my class from the generated Add*Row methods in the *Table classes.
Adding Deprecated Attributes to the generated methods would do the trick. Unfortunately, they will be deleted the next time you create the code.
I can’t use partial methods in non-generated code because the DataSet VS2008 constructor doesn't use them.
MyType.Dataset.Designer.cs looks something like this:
public partial class ThingyDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {
Can I add the Obsolete attribute from MyType.cs ? Attempting to prototype a C-style does not work because the element is already defined. A stuck in partial does not work because the generated item is not partial .
Is there any other way: mark the generated Obsolete method?
How else can I warn users from a generated method?
source share