473,749 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VOID Keyword (VB vs C# Question)

SMH
Hi All,

I am currently making the switch from VB to C#.

I understand that the VOID keyword allows creation of a function which
doesnt require any parameters and doesn't return a value.

Is this then, the equivalentof a SUB in VB?

Thank you.

Simon.

Oct 29 '07 #1
1 1378
SMH
Ok, apologies - Looks like I posted to quickly, found my answer here:
http://groups.google.com/group/micro...4d998896e4b1b2

On Oct 29, 10:27 pm, SMH <simonmhar...@g ooglemail.comwr ote:
Hi All,

I am currently making the switch from VB to C#.

I understand that the VOID keyword allows creation of a function which
doesnt require any parameters and doesn't return a value.

Is this then, the equivalentof a SUB in VB?

Thank you.

Simon.

Oct 29 '07 #2

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

Similar topics

2
11272
by: herrcho | last post by:
#include <stdio.h> int multi; int main() { printf("\nmulti = %p",(void *)multi); printf("\nmulti = %p",(void *)&multi); printf("\nmulti = %p",(void *)multi); printf("\n&multi = %p\n",(void *)&multi);
8
2238
by: Harvey Twyman | last post by:
I have code written under the CCS 'C' Compiler to run on a PIC microcontroller. Code Extract: ------------------------------- char a,b,c; ------------------------------- c = ( a == b ); -------------------------------
3
4354
by: Scott | last post by:
Can anyone please give me a broef explanation of what the void keyword is for? What does it do? Do I need to use it? Thanks, Scott
1
4085
by: Jozsef Bekes | last post by:
Hi All, I need to offer scripting possibilities in my app, and have to use MSSCriptControl for some reasons. I would like to use the feature that's called variable number of arguments, that is done in C# using the params keyword. However, if I AddObject the instance to the MSScriptControl, and try to ivoke a function with variable number of arguments, the script throws an exception. I have exported the class signatrure to a tlb file, and...
18
2138
by: Giannis Papadopoulos | last post by:
According to the standard (ISO C99 draft WG14/N1124), void is the incomplete type that cannot be completed and comprises the empty set of values. Since it declares the absense of a value can it be considered a data type? Regarding void*, is it just a simple reuse of the same keyword (void) or they have a closer relationship? I could think of only one - a pointer to an incomplete type. However, if one could say that void is the absense...
4
1744
by: jm | last post by:
>From MSDN: http://windowssdk.msdn.microsoft.com/en-us/library/scekt9xw.aspx C# Language Reference is (C# Reference) Checks if an object is compatible with a given type. For example, it can be determined if an object is compatible with the string type like this:
24
1808
by: Anthony Irwin | last post by:
Hi all, I have been going through the k&r2 book and all the examples are done with main() instead of int main(void) and k&r2 in the start of chapter 1 does not return 0 so I haven't yet either. I did two compiles shown below. $ gcc -std=c89 -Wall exercise_1-9.c -o exercise_1-9 exercise_1-9.c:5: warning: return type defaults to `int'
8
1226
by: liux | last post by:
I found this sentence in MSDN: When used as a function return type, the void keyword specifies that the function does not return a value. Note that "does not return a value". And I know that Classes have a special member function called a constructor. The constructor can take parameters as needed, but it cannot have a return value. Here is the question: Why could not I use void when declare a constructor?
0
8997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8257
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4709
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.