Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

How To Use '#if' And '#end If'...


  • Please log in to reply
1 reply to this topic

#1 Wolfy87

Wolfy87

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:01:02 AM

Posted 13 September 2008 - 06:05 AM

I am creating a game and as with all basic and advaced games you need to use if statemeants wherein you type #if then after the code #end if but i do not understand it fully, i can use this process in Visual Basic 6 and 9 but not in C# 9 (the program i am using). I have found this on the msdn website but i just dont understand it like i dont understand #define and why you need to assign a word to it. Could someone please just sort of explain it,

Thanks, Wolfy.

BC AdBot (Login to Remove)

 


#2 Wolfy87

Wolfy87
  • Topic Starter

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:01:02 AM

Posted 13 September 2008 - 06:27 AM

Dont worry i worked it out now i have been using this in my tester form...
private void button8_Click(object sender, EventArgs e)
{
//Makes the progress bar decrease slowly and stop when too low.
if (progressBar1.Value < 1)
progressBar1.Value = (progressBar1.Value = 0);
if (progressBar1.Value > 0)
progressBar1.Value = (progressBar1.Value - 1);
}

Thank god for you tube :thumbsup:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users