473,378 Members | 1,527 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,378 software developers and data experts.

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

ABC
In VB, we can write the share function as

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

How about on C#?
Nov 17 '05 #1
8 26067
public static int FnXXX()
{
}

"ABC" wrote:
In VB, we can write the share function as

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

How about on C#?

Nov 17 '05 #2

"ABC" <abc.abc.com> wrote in message
news:uU**************@TK2MSFTNGP15.phx.gbl...
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()
{
}
Nov 17 '05 #3
"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:ul**************@TK2MSFTNGP12.phx.gbl...
In VB, we can write the share function as

How about on C#?


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?
Nov 17 '05 #4
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
Nov 17 '05 #5
> 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.

"Danny Tuppeny" <gr****@dannytuppeny.commmmmm> wrote in message
news:43***********************@ptn-nntp-reader04.plus.net... "Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:ul**************@TK2MSFTNGP12.phx.gbl...
In VB, we can write the share function as

How about on C#?


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?

Nov 17 '05 #6
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
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?


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.
Nov 17 '05 #7
>
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?

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
Nov 17 '05 #8
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:uu*************@TK2MSFTNGP15.phx.gbl...
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.


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 :-)
Nov 17 '05 #9

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

Similar topics

2
by: Pitaridis Aristotelis | last post by:
Can someone give me an example of reading, modifing and writing an XML file???
1
by: Savas Ates | last post by:
the error unknown line 31----------->rs55.movenext what is the my fault? <%@LANGUAGE="VBSCRIPT" CODEPAGE="1254"%> <% Const adUseClient = 3
3
by: PorkyJr | last post by:
Running an asp page that has the following code: <% response.Write MonthName(Month(date)) %> &nbsp; <% response.Write Day(date) %> ,
2
by: Craig Stadler | last post by:
Im trying to write a like query select * from table1 where column1 like 'abc%' (I realize this syntax isnt correct) I want to include any chars from 0-9 in that spot... Does anyone know how...
11
by: Ken | last post by:
How do I force the text generated by a document.write command to wrap after a specified number of characters? Thanks for the help.
3
by: Ike | last post by:
Can anyone discern why the following code writes the document.write() lines literally? That is, a line like document.write('<CENTER>') should write <CENTER> but instead writes the entire ...
1
by: Wootaek Choi | last post by:
Dear Sir, I create webform page that all html code is generated in code behind and sended to IE using Response.Write() like this, namespace localhost.XML { public class Encoding :...
8
by: tatemononai | last post by:
Not to rant, but just in general, ASP.Net seems to be a lot more hassle than traditional ASP. I enjoyed lots of dynamic GUI work with traditional ASP. And I'm a desktop developer by trade, so I...
3
by: Simon Gare | last post by:
Hi All, having a problem with the error "Either BOF or EOF is True, or the current record has been deleted. " found a workaround that allows the non existent data to be bypassed and insert a 0...
3
by: Ben Keshet | last post by:
I have a probably simple beginner's question - I have a script that I am currently able to print its output. instead, i want to write it into a file - I tried different versions of write() but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.