How to write like-as 'VB shared function' in Csharp?

  • Thread starter Thread starter ABC
  • Start date Start date
A

ABC

In VB, we can write the share function as

Public Shared Function FnXXX()
....
....
End Function

How about on C#?
 
ABC said:
In VB, we can write the share function as

Public Shared Function FnXXX()
...
...
End Function

How about on C#?

I believe the equivilent is "static":

public static void FnXXX()
{
}
 
Daniel O'Connell said:
I believe the equivilent is "static":

What's going on here? I recently noticed that VB also has the "friend"
keyword. Do MS think that people using VB are too stupid to understand words
like internal and static?
 
Danny,
What's going on here? I recently noticed that VB also has the "friend"
keyword. Do MS think that people using VB are too stupid to understand
words like internal and static?

Can you explain this a little bit more, is this in a kind of thinking about
superiority from one language? Some people who only are able to speak one
natural language have sometimes the idea that their language is the only
language that is correct, is it something the same?

Cor
 
What's going on here? I recently noticed that VB also has the "friend"
keyword. Do MS think that people using VB are too stupid to understand
words like internal and static?

Visual Basic, like Basic before it, was designed to present "Human-friendly"
syntax to the developer. It has nothing to do with the developer's
intelligence, although I find it a bit irritating myself. But that is
because I perfer syntax that looks more like what the computer is doing
(math). I do admit that it is a preference, however.

As a person who has lived in a number of different sub-cultures within the
United States, and has visited other countries, I have come to understand
that this sort of preference has more to do with culture than logic. In
fact, we humans are almost exactly like computers. We use human language for
the same purpose that computers use programming language: to exchange
information between human entities, and to process information (think
ponder) internally. So, it might be argued that human language is actually
much more sophisticated than computer programming language, tailored to a
computer that has a very high degree of "artificial" intelligence.

In fact, as computer programming becomes more complex, more and more "human"
concepts, such as object-orieted programming, are introduced into the
computer programming realm. And that includes the ability for computers to
interpret human language. I can see the time, not so far into the future,
when we will have real conversations with computers that are as good at or
better than us at figuring out what we mean. Low-level languages are
increasingly becoming relegated to sub-routine types of operations.

So, who knows? There might actually be something TO this sort of syntax.
Perhaps it is just a bit too far "ahead of its time."

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
Cor Ligthert said:
Can you explain this a little bit more, is this in a kind of thinking
about superiority from one language? Some people who only are able to
speak one natural language have sometimes the idea that their language is
the only language that is correct, is it something the same?

WTF?

I didn't suggest any language was superiour, I was asking about the
differences in C# and VB. The words in VB seem to be "simplified", and I
wondered what the reason was.
 
I didn't suggest any language was superiour, I was asking about the
differences in C# and VB. The words in VB seem to be "simplified", and I
wondered what the reason was.
Which implies at least for me that you find the words from *your* language
superior.

Why do you mean "simplified", maybe is the way used in VBNet for some people
more to the point while static means already for a long time static in VB as
keyword.

However that keyword means static inside a program part method/class (which
will be almost for sure set on the same place as shared variables, while it
is only usable static inside the program class/method part where it is
declared).

Cor
 
Cor Ligthert said:
Which implies at least for me that you find the words from *your* language
superior.

You should never assume. It makes an ass out of u and me :)
Superior is *not* the opposite of simple. (superior means better, for the VB
guys ;o)) <<-- JOKE

Sounds to me like you're a bit paranoid (maybe that C# programmers, on
average, get paid more) ;-)

I wasn't suggesting C# was superior, I was saying the terms used in VB look
like babytalk. Or, as another poster said, "human friendly". The words are
simpler - compare Me/this, Shared/static, Friend/internal. I've not got a
problem with that, I was just curious.

If you find that offensive, ignore my post, and the world will be a quiet,
calm place :-)
 
Back
Top