Posts

c#, methods

Image
void mymethod()         {             MessageBox.Show("fuck me!");         } // to call it mymethod(); now with parameters  private void Button1_Click(object sender, EventArgs e)         {             mymethod("bishal", "fucker");                     }         void mymethod(string a, string b)         {             MessageBox.Show(b, a );         }

other loops in c#

Image
private void Button1_Click(object sender, EventArgs e)         {             int i = 0;             while (i < 10)             {                 textBox1.Text += i.ToString();                 i++;             }     }     do while loop:  private void Button1_Click(object sender, EventArgs e)         {             int i = 0;             do             {                 textBox1.Text += i.ToString();                 i++;             } while (i < 10);         }

for loop, list and array in c#

Image
list: array: for loop: generating files in c#

ICTPRG503: debug and monitoring applications

Image
Note: this assignment is based on sql server compact edition. We need to install a software before working on the assignment. You can google the keyword " sql server compact edition download " and download the software from the first link or Link to download the software here:>>  https://www.microsoft.com/en-au/download/details.aspx?id=17876 This was the error. Video tutorial here:  https://www.youtube.com/watch?v=rn54hLwhKYg&feature=youtu.be or download here at:   https://www.mediafire.com/file/fhbx3tazvn947gt/thenewrockdale__ICTPRG503_help_with_the_assignment.mp4/file Steps involved in the process:  log4net install make changes in connection manager.cs replace the code with the try catch block             try             {                 connection.Open();             }             catch (Exception ex)             {                 EventLog newEventLog = new EventLog(""); newEventLog.Sourc

use of mathematical operators and integers

Just like in other programming languages...

switch, case, break

Image
switch (textBox1.Text) {                 case "fuker":                     MessageBox.Show("fukc man!");                     break;                 case "2":                     MessageBox.Show("fukc man!");                     break;                 default:                     MessageBox.Show("Not a valid user!");                     break;             } Syntax