Search Results For : C#

= VS ==

Those who does coding should had once encountered this problem.

To use = or ==. I stumbled on this problem again yesterday when coding up the site.

= Used for assignment.
Example:
$variable = "guohong";
string variableString = "guohong";

== Used for comparison.
Example:
if ( $variable == "guohong" )

Just to put here to remind myself in the future

C# Boot Camp ( Part 1)

What is C#? ( Wiki to what is C# )

Anyway it was fun. 3 letters to summarise the whole UX ( User Experience ). Haha

This maybe useful for me in the future.
//This is how to comment in C#
//This is how to make a message box come out, Message.Show
//(CONTENT OF MESSAGE BOX, TITLE OF THE MESSAGE BOX)
Message.Show("Guo Hong", "Title")

In php, to add things on to a string variable, we do
$des = "Guo Hong is ";
$des .= "handome.";

but in C#,
string des = "Guo Hong is ";
des += "handome.";

Notice the += and .= ?

Haha, hopefully tomorrow will be more interesting! 😀