| | |
functions in the class file
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2007
Posts: 1
Reputation:
Solved Threads: 0
VB.NET Syntax (Toggle Plain Text)
i have writen a function in the vb class file and i am trying to read the function form the asp.net but it is showing an error Error 13 Reference to a non-shared member requires an object reference. can you help please i am new to this subject elvin
Hi,
From the Error, I think you are calling that Function without creating an Instance. For example Consider the Class
This can be called as
If you want access Show regardless of the Class use Shared keyword make it shared among all the instances.
This may helpful or You can show your class and Function calling.
From the Error, I think you are calling that Function without creating an Instance. For example Consider the Class
VB Syntax (Toggle Plain Text)
Public Class A Public Sub Show() End Sub End Class
This can be called as
VB Syntax (Toggle Plain Text)
Dim Obj as A Obj = New A() Obj.Show() 'But not A.Show()
If you want access Show regardless of the Class use Shared keyword make it shared among all the instances.
VB Syntax (Toggle Plain Text)
Public Class A Public Shared Sub Show() End Sub End Class A. Show()
This may helpful or You can show your class and Function calling.
Last edited by selvaganapathy; Sep 7th, 2008 at 9:26 pm.
KSG
![]() |
Similar Threads
- uploaded file moving to new directory (PHP)
- Class help needed (C)
- Writing data into a file (C)
- Database class use (PHP)
- serialize a class (C)
- Write to Screen and File{I-O question} (C++)
- Fraction Class Program (C++)
- Errors with membering functions in a class (C++)
- Using a class to add/delete/show numbers in a Link List (C++)
Other Threads in the VB.NET Forum
- Previous Thread: I am needing a control array, but VB.NET doesn't support them...
- Next Thread: Timer control
| Thread Tools | Search this Thread |
.net .net2008 2008 access add advanced application array basic beginner browser button buttons center click code combo cpu cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic employees excel exists fade filter forms generatetags html images input intel internet listview map mobile module monitor msaccess mysql net number objects open pan panel pdf picturebox picturebox2 port position print printing printpreview regex remove reuse right-to-left save search searchvb.net serial settings shutdown socket sqldatbase sqlserver storedprocedure survey temperature textbox timer timespan transparency txttoxmlconverter user usercontol vb vb.net vba vbnet vista visual visualbasic visualbasic.net visualstudio.net web winforms wpf wrapingcode xml year





