Dot Net (CS/ME-406) : 1. Working With Call Backs and Delegates in Visual Basic
Dot Net (CS/ME-406) : 1. Working With Call Backs and Delegates in Visual Basic
Dot Net (CS/ME-406) : 1. Working With Call Backs and Delegates in Visual Basic
First Name=first;
Last Name=last;
If (string.compare(n1,n2)>0)
Return 1;
}
Else if(string.compare(n1,n2)<0)
Return 1;
else
return 0;
} }
2. Creating a Windows Service with Visual Basic.
using system;
using system.windows.forms;
public form1[ ]
btnHello.Text=”Hello”;
btnHello.click t=delegate
MessageBox.Show[“Hello”]
Button btnGoodBye=newButton[]
btnGoodBye.Text=”GoodBye”
btnGoodBye.Left=btnHello.width+5
btnGoodBye.click+=delegate[object sender.EventArgs e]
MessageBox.show[message];
};
Controls.Add[btnHello];
Controls.Add[btnGoodBye];
3. Using Reflection in Visual Basic.
Using system;
Using system.reflection;
Strict TestStruct { }
Interface TestInterface { }
Enum TestEnum { }
Class class1
Try
Else
Return 0;
}
4. Sending Mail and SMTP Mail and Visual Basic.
My message.To=”mayank_06@yahoo.in”
My message.From=”mayank_06@yahoo.in”
My message.subject=”This is test”
My message.priority.mail priority.High
My message.atachment.Add(Attachment)
Smtp mail.send(MyMessage)
5. Perform String Manipulation with the String Builder and String Classes
and Visual Basic
using system;
namespace consoleApplication1 {
class program {
string str=”Mouser”;
str.Replace(“u”,”U”);
console.writeline(str);
console.readline();
}
}
nwindconn.open()
sqlconnection nwindconn=newsqlconnection
nwindconn.open();