SEARCH
TOOLBOX
LANGUAGES
Register    Login    Forum    Search    FAQ

Board index » Electronics Projects » PIC microcontroller projects




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Different between using public bool and public void in C#?
 Post Posted: Thu Feb 16, 2012 8:39 pm 
Offline

Joined: Thu Sep 29, 2011 4:18 pm
Posts: 51
Can anyone tell me what is the different between using public bool and public void in C#?

For example:

what is the reason of using public void in below example ?
public void updateDeviceSettings(int leftMeterSensitivity, int rightMeterSensitivity, int ledFadeOn, int ledFadeOff)

what is the reason of using public bool in below example ?
public bool updateDevice(int leftMeterPercentage, int rightMeterPercentage,int ledRedValue, int ledGreenValue, int ledBlueValue, bool detachUsbOnButton)


Top 
 Profile  
 
 Post subject: Re: Different between using public bool and public void in C
 Post Posted: Thu Feb 16, 2012 11:56 pm 
Offline

Joined: Thu Sep 22, 2011 2:35 am
Posts: 77
Location: Carlisle England
With bool a true or false is returned by the procedure.

With void nothing is returned.


Top 
 Profile  
 
 Post subject: Re: Different between using public bool and public void in C
 Post Posted: Fri Feb 17, 2012 3:58 pm 
Offline

Joined: Thu Sep 29, 2011 4:18 pm
Posts: 51
Thank for guiding Sir Simon Inns


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 3 posts ] 

Board index » Electronics Projects » PIC microcontroller projects


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Translated by MaĆ«l Soucaze © 2009 phpBB.fr