473,320 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Help please

Dear newsgroup - do not reply to this e-mail address. I have just
created it to avoid getting spam to my real address. Reply to the
newsgroup. I am watching them all now so please reply now.
How do I get a list of methods that my class supports? Here is my
code.
I want

MsgBox(a.GetMethods, MsgBoxStyle.Information Or MsgBoxStyle.OKOnly,
a.GetVersion)

to display, if a is a "TanOperations", "getTan1, getTan2". If a is a
"SinOperations", "getSin" etc.

To help you I am using Visual Studio .net 2003.

Thank you
Gladys

Imports System.Math

Public Class Form1
Inherits System.Windows.Forms.Form

Private MustInherit Class Trigonometry
Public Shared Function GetVersion() As String
Return "V1.0.1"
End Function

Public Function GetMethods() As String()
'WHAT CODE GOES IN HERE??
'=========================

End Function
End Class

Private Class TanOperations
Inherits Trigonometry
Public Function getTan1(ByVal opp As Double, ByVal adj As
Double) As Double
Return Tan(opp / adj)
End Function

Public Function getTan2(ByVal theta As Double) As Double
Return Tan(theta)
End Function
End Class

Private Class SinOperations
Inherits Trigonometry
Public Function getSin(ByVal opp As Double, ByVal hypot As
Double) As Double
Return Sin(opp / hypot)
End Function
End Class

'windows form designer code deleted to save posting space
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim a As New TanOperations
MsgBox(a.getTan(10, 20), MsgBoxStyle.Information Or
MsgBoxStyle.OKOnly, a.GetVersion)
MsgBox(a.GetMethods, MsgBoxStyle.Information Or
MsgBoxStyle.OKOnly, a.GetVersion)
End Sub
End Class
Nov 20 '05 #1
7 1043
You can use System.Reflection.Assembly to get info.
"Gladys" <gl***********@hotmail.com> wrote in message
news:67**************************@posting.google.c om...
Dear newsgroup - do not reply to this e-mail address. I have just
created it to avoid getting spam to my real address. Reply to the
newsgroup. I am watching them all now so please reply now.
How do I get a list of methods that my class supports? Here is my
code.
I want

MsgBox(a.GetMethods, MsgBoxStyle.Information Or MsgBoxStyle.OKOnly,
a.GetVersion)

to display, if a is a "TanOperations", "getTan1, getTan2". If a is a
"SinOperations", "getSin" etc.

To help you I am using Visual Studio .net 2003.

Thank you
Gladys

Imports System.Math

Public Class Form1
Inherits System.Windows.Forms.Form

Private MustInherit Class Trigonometry
Public Shared Function GetVersion() As String
Return "V1.0.1"
End Function

Public Function GetMethods() As String()
'WHAT CODE GOES IN HERE??
'=========================

End Function
End Class

Private Class TanOperations
Inherits Trigonometry
Public Function getTan1(ByVal opp As Double, ByVal adj As
Double) As Double
Return Tan(opp / adj)
End Function

Public Function getTan2(ByVal theta As Double) As Double
Return Tan(theta)
End Function
End Class

Private Class SinOperations
Inherits Trigonometry
Public Function getSin(ByVal opp As Double, ByVal hypot As
Double) As Double
Return Sin(opp / hypot)
End Function
End Class

'windows form designer code deleted to save posting space
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim a As New TanOperations
MsgBox(a.getTan(10, 20), MsgBoxStyle.Information Or
MsgBoxStyle.OKOnly, a.GetVersion)
MsgBox(a.GetMethods, MsgBoxStyle.Information Or
MsgBoxStyle.OKOnly, a.GetVersion)
End Sub
End Class

Nov 20 '05 #2
Gladys,

Point 1:
=============
What you are after is in the on-line help for VS 2003. Read it. Here is the
reference to get you started and includes a sample application.

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfSystemTypeCla
ssGetMethodsTopic.htm

Point 2:
=============
As you have written the following

MsgBox(a.GetMethods, MsgBoxStyle.Information Or MsgBoxStyle.OKOnly,
a.GetVersion)

it gives the developer the distinct impression that "GetVersion" is a
property of the instance of the class. It isn't, it is a property of the
class and doesn't require an instance to even be created. Your code could
(and IMHO should) read

MsgBox(a.GetMethods, MsgBoxStyle.Information Or MsgBoxStyle.OKOnly,
TanOperations.GetVersion)

Point 3:
=============
Don't cross post like this. You posted to all of

microsoft.public.dotnet.languages.vb.data
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.languages.vb,
microsoft.public.dotnet.languages.vb.upgrade

Think about the intended audience for your posting. Post to limited and
appropriate newsgroup(s) only. And lastly a comment on tone. I doubt very
much that comments like "I am watching them all now so please reply now."
is going to endear you to many people.

Hexathioorthooxalate


"Gladys" <gl***********@hotmail.com> wrote in message
news:67**************************@posting.google.c om...
Dear newsgroup - do not reply to this e-mail address. I have just
created it to avoid getting spam to my real address. Reply to the
newsgroup. I am watching them all now so please reply now.
How do I get a list of methods that my class supports? Here is my
code.
I want

MsgBox(a.GetMethods, MsgBoxStyle.Information Or MsgBoxStyle.OKOnly,
a.GetVersion)

to display, if a is a "TanOperations", "getTan1, getTan2". If a is a
"SinOperations", "getSin" etc.

To help you I am using Visual Studio .net 2003.

Thank you
Gladys

Imports System.Math

Public Class Form1
Inherits System.Windows.Forms.Form

Private MustInherit Class Trigonometry
Public Shared Function GetVersion() As String
Return "V1.0.1"
End Function

Public Function GetMethods() As String()
'WHAT CODE GOES IN HERE??
'=========================

End Function
End Class

Private Class TanOperations
Inherits Trigonometry
Public Function getTan1(ByVal opp As Double, ByVal adj As
Double) As Double
Return Tan(opp / adj)
End Function

Public Function getTan2(ByVal theta As Double) As Double
Return Tan(theta)
End Function
End Class

Private Class SinOperations
Inherits Trigonometry
Public Function getSin(ByVal opp As Double, ByVal hypot As
Double) As Double
Return Sin(opp / hypot)
End Function
End Class

'windows form designer code deleted to save posting space
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim a As New TanOperations
MsgBox(a.getTan(10, 20), MsgBoxStyle.Information Or
MsgBoxStyle.OKOnly, a.GetVersion)
MsgBox(a.GetMethods, MsgBoxStyle.Information Or
MsgBoxStyle.OKOnly, a.GetVersion)
End Sub
End Class

Nov 20 '05 #3
1) Very well stated...
2) How do you say this "Hexathioorthooxalate"

I have
Hex-a'-thio-ortho-oxa-late...

Could you use it in a sentance? =)

"Hexathioorthooxalate" <ru***@spameremove.clara.co.uk> wrote in message
news:10***************@despina.uk.clara.net...
Gladys,

Point 1:
=============
What you are after is in the on-line help for VS 2003. Read it. Here is the reference to get you started and includes a sample application.

ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfSystemTypeCla ssGetMethodsTopic.htm

Point 2:
=============
As you have written the following

MsgBox(a.GetMethods, MsgBoxStyle.Information Or MsgBoxStyle.OKOnly,
a.GetVersion)

it gives the developer the distinct impression that "GetVersion" is a
property of the instance of the class. It isn't, it is a property of the
class and doesn't require an instance to even be created. Your code could
(and IMHO should) read

MsgBox(a.GetMethods, MsgBoxStyle.Information Or MsgBoxStyle.OKOnly,
TanOperations.GetVersion)

Point 3:
=============
Don't cross post like this. You posted to all of

microsoft.public.dotnet.languages.vb.data
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.languages.vb,
microsoft.public.dotnet.languages.vb.upgrade

Think about the intended audience for your posting. Post to limited and
appropriate newsgroup(s) only. And lastly a comment on tone. I doubt very
much that comments like "I am watching them all now so please reply now."
is going to endear you to many people.

Hexathioorthooxalate


"Gladys" <gl***********@hotmail.com> wrote in message
news:67**************************@posting.google.c om...
Dear newsgroup - do not reply to this e-mail address. I have just
created it to avoid getting spam to my real address. Reply to the
newsgroup. I am watching them all now so please reply now.
How do I get a list of methods that my class supports? Here is my
code.
I want

MsgBox(a.GetMethods, MsgBoxStyle.Information Or MsgBoxStyle.OKOnly,
a.GetVersion)

to display, if a is a "TanOperations", "getTan1, getTan2". If a is a
"SinOperations", "getSin" etc.

To help you I am using Visual Studio .net 2003.

Thank you
Gladys

Imports System.Math

Public Class Form1
Inherits System.Windows.Forms.Form

Private MustInherit Class Trigonometry
Public Shared Function GetVersion() As String
Return "V1.0.1"
End Function

Public Function GetMethods() As String()
'WHAT CODE GOES IN HERE??
'=========================

End Function
End Class

Private Class TanOperations
Inherits Trigonometry
Public Function getTan1(ByVal opp As Double, ByVal adj As
Double) As Double
Return Tan(opp / adj)
End Function

Public Function getTan2(ByVal theta As Double) As Double
Return Tan(theta)
End Function
End Class

Private Class SinOperations
Inherits Trigonometry
Public Function getSin(ByVal opp As Double, ByVal hypot As
Double) As Double
Return Sin(opp / hypot)
End Function
End Class

'windows form designer code deleted to save posting space
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim a As New TanOperations
MsgBox(a.getTan(10, 20), MsgBoxStyle.Information Or
MsgBoxStyle.OKOnly, a.GetVersion)
MsgBox(a.GetMethods, MsgBoxStyle.Information Or
MsgBoxStyle.OKOnly, a.GetVersion)
End Sub
End Class


Nov 20 '05 #4

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:vv************@corp.supernews.com...
1) Very well stated...
2) How do you say this "Hexathioorthooxalate"

I have
Hex-a'-thio-ortho-oxa-late...

Could you use it in a sentance? =)


Or better yet, can you smoke it? ;-D
Nov 20 '05 #5
;)

I see a new bond exists between Lorne and I...

"Lorne Smith" <no@spam.here> wrote in message
news:et**************@TK2MSFTNGP10.phx.gbl...

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:vv************@corp.supernews.com...
1) Very well stated...
2) How do you say this "Hexathioorthooxalate"

I have
Hex-a'-thio-ortho-oxa-late...

Could you use it in a sentance? =)


Or better yet, can you smoke it? ;-D

Nov 20 '05 #6
> I see a new bond exists between Lorne and I...

Not lost on me :)
Could you use it in a sentance? =)

Well, you asked for it. Off the top of my head "The thermal decomposition of
hexathioorthooxalates to tetrathioethylenes and dialkyldisulphide is an
attractive synthetic route to tetrathiafulvalenes.".

I described it to someone else once - here's the link.

http://groups.google.co.uk/groups?hl...TF-8%26hl%3Den
Hex

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:vv************@corp.supernews.com... ;)

I see a new bond exists between Lorne and I...

"Lorne Smith" <no@spam.here> wrote in message
news:et**************@TK2MSFTNGP10.phx.gbl...

"CJ Taylor" <no****@blowgoats.com> wrote in message
news:vv************@corp.supernews.com...
1) Very well stated...
2) How do you say this "Hexathioorthooxalate"

I have
Hex-a'-thio-ortho-oxa-late...

Could you use it in a sentance? =)


Or better yet, can you smoke it? ;-D


Nov 20 '05 #7
* gl***********@hotmail.com (Gladys) scripsit:
How do I get a list of methods that my class supports? Here is my
code.
I want

MsgBox(a.GetMethods, MsgBoxStyle.Information Or MsgBoxStyle.OKOnly,
a.GetVersion)

to display, if a is a "TanOperations", "getTan1, getTan2". If a is a
"SinOperations", "getSin" etc.


Have a look at:

'System.Reflection' namespace.
'Object.GetType' method.
'Type.Get<...>' methods.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: laurie | last post by:
Hi all, I'm trying to help out a friend who has inherited a client with a PHP shopping cart application. Neither of us know PHP, but I've been muddling my way through, trying to get these old...
1
by: the_proud_family | last post by:
HELP ME PLEASE!! my email is the_proud_family@yahoo.com I can't get the ball to go up right side and then I need it to turn around and keep turning until velocity=0 I have been at it for the ...
0
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web...
12
by: Christo | last post by:
borland c++ 5.01 character constant must be one or two characters long get this when compiling my first c++ program can anyone out there help? it is highlighting this line as the problem ...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
5
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig ...
17
by: JT | last post by:
Help me the following C++ question: Write a program to help a local bookshop automate its billing system. The program should do the following: (a)Let the user enter the ISBN, the system will...
7
by: tyler_durden | last post by:
thanks a lot for all your help..I'm really appreciated... with all the help I've been getting in forums I've been able to continue my program and it's almost done, but I'm having a big problem that...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
2
by: =?Utf-8?B?U2NvdHRSYWREZXY=?= | last post by:
I'm creating a doc project for my c# program. I've done this before but this time sonething is wrong. I build my doc project and is succeeds but when I open the help file, there is no documentation...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.