Page 1 of 1

If then C#?

Posted: Thu Dec 23, 2010 10:59 am
by zachman61
how can i write these?
and how can i write vbnewline or whatever it is :D

Re: If then C#?

Posted: Thu Dec 23, 2010 11:37 am
by Axel
Code: Select all
if(this.text == "lol")
{
//do your thing here :P 
}
//elseif :
if(this.text == "lol")
{
//do your thing
}else
if(this.text == "lolol")
{
//do something else
}
NOTE : you should use == for boolean , if you use 1 = , this means you set the text



new line :
Code: Select all
"Hey after this , there will be a new line \n This is the other line :D"
just place "\n" in your string
if you want to display something with \ , place 2x \, "\\n" for example , a path , "D:\\Users\\Me\\Documents\\lol.txt"

EDIT: sorry for not using
Code: Select all
 , was to lazy :P

Re: If then C#?

Posted: Thu Dec 23, 2010 1:57 pm
by Agust1337
So Zach, are you now going to cod in c# :P?

Re: If then C#?

Posted: Thu Dec 23, 2010 8:24 pm
by mandai
If you want the equivilent for vbCrLf then that will be "\r\n".
You could also declare a string starting with @ to include single backslash characters.

Re: If then C#?

Posted: Thu Dec 23, 2010 9:48 pm
by DreadNought
the @ sign is normally used in file paths tbh.

If your going to start learning C# I hope it goes all well... i've been learning C# for about 11 months and and I will admit at first its not so good but it gets better. So far I'm learning pointers I can create ciphers and encryption's along with ansyc sockets with a complex client and server so if you need help with anything just send me a PM.

Re: If then C#?

Posted: Thu Dec 23, 2010 10:10 pm
by zachman61
paralyzer wrote:
the @ sign is normally used in file paths tbh.

If your going to start learning C# I hope it goes all well... i've been learning C# for about 11 months and and I will admit at first its not so good but it gets better. So far I'm learning pointers I can create ciphers and encryption's along with ansyc sockets with a complex client and server so if you need help with anything just send me a PM.
well so far all ive made is a message box generator :D

Posted: Thu Dec 23, 2010 10:37 pm
by Axel
zachman61 wrote:
paralyzer wrote:
the @ sign is normally used in file paths tbh.

If your going to start learning C# I hope it goes all well... i've been learning C# for about 11 months and and I will admit at first its not so good but it gets better. So far I'm learning pointers I can create ciphers and encryption's along with ansyc sockets with a complex client and server so if you need help with anything just send me a PM.
well so far all ive made is a message box generator :D
Here are some good idea's for you to learn programming

A calculator
A notepad
A ftp uploader
A Downloader
A System info program
A Game :P
An archiver (a little more difficult)
A Paint applications


and more but the ideas aren't there right now :P

Re: If then C#?

Posted: Thu Dec 23, 2010 11:17 pm
by zachman61
I might try the notepad :D