• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 472
  • Last Modified:

Visual basic DebuggerNonUserCodeAttribute, how and why is it used.

what does the statement System.Diagnostics.DebuggerNonUserCodeAttribute(), _
         System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, False) do before a function?

Thanks
0
atomicgs12
Asked:
atomicgs12
  • 2
1 Solution
 
Todd GerbertIT ConsultantCommented:
They are attributes - attributes describe objects, methods, properties, etc.  For example, you might use the "DllImportAttribute" on a method to tell the compiler that it's actually a function in a DLL; or the "SerializableAttribute" to tell the compiler that the class it's applied to can be serialized into an XML file.

These two attributes look like they're automatically applied by Visual Studio to code that Visual Studio maintains for you (like the code that describes the layout of a form), so you probably don't need to be concerned with them.

Attributes: http://msdn.microsoft.com/en-us/library/z0w1kczw.aspx

DebuggerNonUserCodeAttribute: http://msdn.microsoft.com/en-us/library/system.diagnostics.debuggernonusercodeattribute.aspx

DataObjectMethodAttribute: http://msdn.microsoft.com/en-us/library/system.componentmodel.dataobjectmethodattribute.aspx
0
 
atomicgs12Author Commented:
Makes sense. So how does a function like:
<System.Diagnostics.DebuggerNonUserCodeAttribute(),_ System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, False)> _
        Public Overridable Overloads Function DeleteOlderThan(ByVal CutOff As System.Nullable(Of Date)) As Integer
get autogenerated? What tool might be used? Of course this is related to a database.
Thanks
0
 
Todd GerbertIT ConsultantCommented:
Probably the result of adding an Entity Framework object.  Normally you wouldn't mess the the .vb files though - like when you want to add a button to a form you don't edit the Form1.Designer.vb file by hand, you use the designer to drag a button from the toolbox onto your form.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now