Home All Groups Group Topic Archive Search About
Author
12 Mar 2009 10:36 AM
Roland Grothe
Hello.

I'm anewbie to .Net, but I work with Access and VB6 for quite a while.

Following Problem:

How can I call a funktion dymacally, something like this

Public Function Test1()
Returns 1
End Function

Public Function Test2()
Returns 2
End Function

Sub Main()

dim i, r as integer
i=2

'**************
r = Test & i.ToString()
'**************
end sub

Any idea?

Author
12 Mar 2009 11:10 AM
Michael Williams
"Roland Grothe" <RolandGro***@discussions.microsoft.com> wrote in message
news:EDCA5127-EA4B-4AFC-988D-6F7DD3167D6F@microsoft.com...

> Hello. I'm a newbie to .Net . . .

You're in the wrong group. This is a Visual Basic group and Visual Basic
code will not work in VB.Net, which is not Visual Basic at all despite the
name deliberately and dishonestly given to it by the Micro$oft marketing
gypsies. If you want answers to VB.Net questions (or any .Net questions)
then you should ask them on the appropriate group. Even if your question
relates to how to rewrite some VB6 code in VB.Net (in fact /especially/ if
your question relates to rewriting VB6 code in VB.Net) then you should still
ask it on the VB.Net group, where there are people who have done just that,
in many cases after a lot of rewriting. Try:

    microsoft.public.dotnet.languages.vb

There is a troll here though, an idiot called Bill McCarthy, who might post
an answer for you here in pursuance of his deliberate and ongoing attempts
to destroy the group and annoy its members on behalf of his puppet master,
but personally I would advise ignoring him and posting your question on the
correct group where you will probably get lots of suitable answers.

Mike
Author
12 Mar 2009 11:56 AM
Bill McCarthy
Hi Roland,

In both VB6 and VB.NET you can use the CallByName function.  For .NET
specific questions best to ask in the dotnet newsgroups such as :
microsoft.public.dotnet.languages.vb




Show quoteHide quote
"Roland Grothe" <RolandGro***@discussions.microsoft.com> wrote in message
news:EDCA5127-EA4B-4AFC-988D-6F7DD3167D6F@microsoft.com...
> Hello.
>
> I'm anewbie to .Net, but I work with Access and VB6 for quite a while.
>
> Following Problem:
>
> How can I call a funktion dymacally, something like this
>
> Public Function Test1()
> Returns 1
> End Function
>
> Public Function Test2()
> Returns 2
> End Function
>
> Sub Main()
>
> dim i, r as integer
> i=2
>
> '**************
> r = Test & i.ToString()
> '**************
> end sub
>
> Any idea?
Author
12 Mar 2009 12:56 PM
MikeD
"Roland Grothe" <RolandGro***@discussions.microsoft.com> wrote in message news:EDCA5127-EA4B-4AFC-988D-6F7DD3167D6F@microsoft.com...
> Hello.
>
> I'm anewbie to .Net, but I work with Access and VB6 for quite a while.


You need to ask this in a newsgroup having "dotnet" or "vsnet" in its name.

--
Mike
Author
12 Mar 2009 1:13 PM
Michael C
Show quote Hide quote
"Roland Grothe" <RolandGro***@discussions.microsoft.com> wrote in message
news:EDCA5127-EA4B-4AFC-988D-6F7DD3167D6F@microsoft.com...
> Hello.
>
> I'm anewbie to .Net, but I work with Access and VB6 for quite a while.
>
> Following Problem:
>
> How can I call a funktion dymacally, something like this
>
> Public Function Test1()
> Returns 1
> End Function
>
> Public Function Test2()
> Returns 2
> End Function
>
> Sub Main()
>
> dim i, r as integer
> i=2
>
> '**************
> r = Test & i.ToString()
> '**************
> end sub
>
> Any idea?

Why do you need to do this? It looks like a bad idea to me.
Author
12 Mar 2009 6:53 PM
Karl E. Peterson
Michael C wrote:
> Why do you need to do this? It looks like a bad idea to me.

Take it somewhere else, presumably where someone might care.
--
..NET: It's About Trust!
http://vfred.mvps.org
Author
13 Mar 2009 8:27 AM
Michael C
"Karl E. Peterson" <k***@mvps.org> wrote in message
news:eAuVKP0oJHA.1340@TK2MSFTNGP06.phx.gbl...
> Michael C wrote:
>> Why do you need to do this? It looks like a bad idea to me.
>
> Take it somewhere else, presumably where someone might care.

Do you have anything useful to add to this discussion Carly? There's always
a first for everything.

Michael