AdBrite

Your Ad Here

Friday, December 17, 2010

C# Split String

=== Example program for splitting on spaces (C#) ===

using System;

class Program
{
    static void Main()
    {
        string s = "there is a cat";
        //
        // Split string on spaces.
        // ... This will separate all the words.
        //
        string[] words = s.Split(' ');
        foreach (string word in words)
        {
            Console.WriteLine(word);
        }
    }
}

=== Output of the program ===

there
is
a
cat

Wednesday, December 15, 2010

The Click Event for Buttons

The Click Event for Buttons

The click event gets activated when a button is clicked on. Examine the default code for a button:
private void button1_Click(object sender, EventArgs e)
{
}
In between the round brackets, we have this:
object sender, EventArgs e
The object keyword refers to the object which activated the event, a button in this case. This is being placed in a variable called sender. You can test this for yourself.
Start a new project. Add a button to your new form and double click it. Place the following code between the curly brackets:
MessageBox.Show( sender.ToString() );
We're just using the ToString method on the sender variable. Run your programme and click the button. You should see this:

C# Message Box for the Sender Object
The Message is displaying which object was the sender of the event, as well as displaying the Text property of the sender: the button with the Text "button1".
The other argument in between the round brackets was this:
EventArgs e
EventArgs is a class. It's short for event arguments, and tells you which events was raised. The letter "e" sets up a variable to use this class. If you change your line of code to this:
MessageBox.Show( e.ToString() );
the message box will then display the following:

Tuesday, December 14, 2010

C# Delegate

        // This "DoMath" delegate can point to ANY method that:
        //   - Returns an int
        //   - Accepts two ints as parameters
        public delegate int DoMath(int x, int y);

      
        private void button1_Click(object sender, EventArgs e)
        {
            int result;

            DoMath a = new DoMath(Add);
            result = a(3, 4);
            MessageBox.Show(Convert.ToString(result));

            UseDelegate(a);
        }


        public void UseDelegate(DoMath x)
        {
            int r = x(6, 6);
            MessageBox.Show(Convert.ToString(r));

        }

       
        //This method can be pointed to by the DoMath delegate
        public int Add(int x, int y)
        {
            return x+y;
        }

        //This method can be pointed to by the DoMath delegate
        public int Subtract(int x, int y)
        {
            return x - y;
        }

        //This method can NOT be pointed to by the DoMath delegate
        //because it has a different signature (only one argument)
        public string Test(string y)
        {
            return "Test method";
        }
    }

Monday, December 6, 2010

Loop through the content of an array

            //create the array
            int[] ml = new int[7]; //{ 5, 3, 7, 9, 2, 6, 8, };
           
            //loop through the content of the ml array
            string x = "";

            for (int i = 0; i < ml.Length; i++)
            {
                x += Convert.ToInt32(ml[i]) + " ";
            }

            MessageBox.Show(x);

Wednesday, December 1, 2010

VTC Video Training Collection

http://www.megaupload.com/?d=Z937D566 VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part06.rar VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part06.rar 3.61 MB 0 
http://www.megaupload.com/?d=SEMPCCY7 VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part03.rar VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part03.rar 95.78 MB 0
http://www.megaupload.com/?d=4Z04QKQ9 VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part04.rar VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part04.rar 95.78 MB 0
http://www.megaupload.com/?d=FH98CX06 VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part6.rar VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part6.rar 15.61 MB 0
http://www.megaupload.com/?d=CH0OPQK6 VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part02.rar VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part02.rar 95.78 MB 0
http://www.megaupload.com/?d=FSQ3WJA9 VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part01.rar VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part01.rar 95.78 MB 0
http://www.megaupload.com/?d=WEQ2A474 VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part3.rar VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part3.rar 95.78 MB 0
http://www.megaupload.com/?d=2DGRM8ZP VTC.CompTIA.A.Plus.Certification.2003.part2.rar VTC.CompTIA.A.Plus.Certification.2003.part2.rar 67.33 MB 0
http://www.megaupload.com/?d=4QLUSZ7U VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part05.rar VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part05.rar 95.78 MB 0
http://www.megaupload.com/?d=U53POBGY VTC.intro.to.Ubuntu.part3.rar VTC.intro.to.Ubuntu.part3.rar 37.14 MB 0
http://www.megaupload.com/?d=QN3CNWXV VTC.Javascript.2007.by.CFE.part4.rar VTC.Javascript.2007.by.CFE.part4.rar 15.96 MB 0
http://www.megaupload.com/?d=1URPYFG1 VTC.CompTIA.Network.Plus.Certification.2005.Exam.Objectives.part1.rar VTC.CompTIA.Network.Plus.Certification.2005.Exam.Objectives.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=MBV6YCLH VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part1.rar VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=XWE7D5TX VTC.Java.2.Certified.Programmer.part1.rar VTC.Java.2.Certified.Programmer.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=9R7FZRVE VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part04.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part04.rar 95.78 MB 0
http://www.megaupload.com/?d=OI3PA7I2 VTC.CompTIA.Network.Plus.Certification.2005.Exam.Objectives.part3.rar VTC.CompTIA.Network.Plus.Certification.2005.Exam.Objectives.part3.rar 63.65 MB 0
http://www.megaupload.com/?d=78057E9A VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part02.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part02.rar 95.78 MB 0
http://www.megaupload.com/?d=PY40Z81A VTC.intro.to.Visual.Basic.NET.rar VTC.intro.to.Visual.Basic.NET.rar 86.42 MB 0
http://www.megaupload.com/?d=RG0DGYGQ VTC.Java.2.Certified.Programmer.part2.rar VTC.Java.2.Certified.Programmer.part2.rar 39.95 MB 0
http://www.megaupload.com/?d=F491P6EP VTC.intro.to.PHP.part2.rar VTC.intro.to.PHP.part2.rar 70.5 MB 0
http://www.megaupload.com/?d=PE9N8RI5 VTC.Javascript.2007.by.CFE.part1.rar VTC.Javascript.2007.by.CFE.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=RF59VLWM VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part4.rar VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part4.rar 95.78 MB 0
http://www.megaupload.com/?d=4E44PXLF VTC.Javascript.2007.by.CFE.part2.rar VTC.Javascript.2007.by.CFE.part2.rar 95.78 MB 0
http://www.megaupload.com/?d=0AKNERBH VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part5.rar VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part5.rar 95.78 MB 0
http://www.megaupload.com/?d=7V8N6XIS VTC.Javascript.2007.by.CFE.part3.rar VTC.Javascript.2007.by.CFE.part3.rar 95.78 MB 0
http://www.megaupload.com/?d=0U6W6LH9 VTC.Maya.Fundamentals.part2.rar VTC.Maya.Fundamentals.part2.rar 35.17 MB 0
http://www.megaupload.com/?d=2C3PICJ8 VTC.CompTIA.A.Plus.Certification.2003.part1.rar VTC.CompTIA.A.Plus.Certification.2003.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=2J2GGTJI VTC.CompTIA.Network.Plus.Certification.2005.Exam.Objectives.part2.rar VTC.CompTIA.Network.Plus.Certification.2005.Exam.Objectives.part2.rar 95.78 MB 0
http://www.megaupload.com/?d=12H0UTH0 VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part05.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part05.rar 95.78 MB 0
http://www.megaupload.com/?d=AJN3TRO0 VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part2.rar VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part2.rar 95.78 MB 0
http://www.megaupload.com/?d=O87X6WOG VTC.intro.to.TCP.IP.rar VTC.intro.to.TCP.IP.rar 27.49 MB 0
http://www.megaupload.com/?d=5KWH7KFB VTC.Maya.Fundamentals.part1.rar VTC.Maya.Fundamentals.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=9RADRAV0 VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part07.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part07.rar 95.78 MB 0
http://www.megaupload.com/?d=ATFDIX9F VTC.intro.to.Windows.Vista.part2.rar VTC.intro.to.Windows.Vista.part2.rar 69.69 MB 0
http://www.megaupload.com/?d=9D8X58D6 VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part01.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part01.rar 95.78 MB 0
http://www.megaupload.com/?d=PMC7R283 VTC.intro.to.Windows.Vista.part1.rar VTC.intro.to.Windows.Vista.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=ODJD5OZM VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part08.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part08.rar 95.78 MB 0
http://www.megaupload.com/?d=SL6497A5 VTC.intro.to.Ubuntu.part1.rar VTC.intro.to.Ubuntu.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=YOMPLINN VTC.intro.to.Ubuntu.part2.rar VTC.intro.to.Ubuntu.part2.rar 95.78 MB 0
http://www.megaupload.com/?d=DHGVDMI2 VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part14.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part14.rar 95.78 MB 0
http://www.megaupload.com/?d=8AAEWI1H VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part06.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part06.rar 95.78 MB 0
http://www.megaupload.com/?d=WM5I0EEY VTC.Photoshop.Artistry.part7.rar VTC.Photoshop.Artistry.part7.rar 13.72 MB 0
http://www.megaupload.com/?d=HUMN89Z1 VTC.Photoshop.Artistry.part2.rar VTC.Photoshop.Artistry.part2.rar 95.78 MB 0
http://www.megaupload.com/?d=FCP4ON72 VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part11.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part11.rar 95.78 MB 0
http://www.megaupload.com/?d=RHCCRSWF VTC.PHP.Project.Solutions.part2.rar VTC.PHP.Project.Solutions.part2.rar 11.5 MB 0
http://www.megaupload.com/?d=D5CF217S VTC.Photoshop.Artistry.part4.rar VTC.Photoshop.Artistry.part4.rar 95.78 MB 0
http://www.megaupload.com/?d=DSN0YPRM VTC.Photoshop.Artistry.part6.rar VTC.Photoshop.Artistry.part6.rar 95.78 MB 0
http://www.megaupload.com/?d=7XYRLFHI VTC.intro.to.PHP.part1.rar VTC.intro.to.PHP.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=S3M501L2 VTC.Photoshop.Image.Restoration.part2.rar VTC.Photoshop.Image.Restoration.part2.rar 39.98 MB 0
http://www.megaupload.com/?d=DZSU0C48 VTC.Photoshop.Artistry.part1.rar VTC.Photoshop.Artistry.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=TJ4W1CU3 VTC.Photoshop.Artistry.part3.rar VTC.Photoshop.Artistry.part3.rar 95.78 MB 0
http://www.megaupload.com/?d=F1EH737X VTC.QuickStart.Adobe.Flash.CS3.rar VTC.QuickStart.Adobe.Flash.CS3.rar 56.02 MB 0
http://www.megaupload.com/?d=PE8Q04XG VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part13.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part13.rar 95.78 MB 0
http://www.megaupload.com/?d=44IZD0WI VTC.Photoshop.Artistry.part5.rar VTC.Photoshop.Artistry.part5.rar 95.78 MB 0
http://www.megaupload.com/?d=SL89N6CN VTC.Photoshop.Image.Restoration.part1.rar VTC.Photoshop.Image.Restoration.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=1ZODUS8J VTC.Intro.to.M_.NET.Framework.rar VTC.Intro.to.M_.NET.Framework.rar 74.85 MB 0
http://www.megaupload.com/?d=E86IDC5F VTC.QuickStart.Adobe.Dreamweaver.CS3.rar VTC.QuickStart.Adobe.Dreamweaver.CS3.rar 89.54 MB 0
http://www.megaupload.com/?d=1HT6KWYC VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part10.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part10.rar 95.78 MB 0
http://www.megaupload.com/?d=5JJPX5LL VTC.SQL.Server.2005.Admin.part1.rar VTC.SQL.Server.2005.Admin.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=2G97Q23V VTC_PhotoshopCS3_CFE_ViH.part5.rar VTC_PhotoshopCS3_CFE_ViH.part5.rar 95.78 MB 0
http://www.megaupload.com/?d=SRH862IG VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part06.rar VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part06.rar 3.61 MB 0
http://www.megaupload.com/?d=S6AHWOL5 VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part09.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part09.rar 95.78 MB 0
http://www.megaupload.com/?d=NET44QWO VTC.QuickStart.Adobe.Photoshop.CS3.rar VTC.QuickStart.Adobe.Photoshop.CS3.rar 50.74 MB 0
http://www.megaupload.com/?d=Q1D10B39 VTC.Real.World.PHP.Programming.Basics.part2.rar VTC.Real.World.PHP.Programming.Basics.part2.rar 95.78 MB 0
http://www.megaupload.com/?d=Z2PFKXQD VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part01.rar VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part01.rar 95.78 MB 0
http://www.megaupload.com/?d=D0C30TJL VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part02.rar VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part02.rar 95.78 MB 0
http://www.megaupload.com/?d=D9NLDHVF VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part05.rar VTC.ACT.By.Sage.2006.Bill.Ferguson.LiBiSO.part05.rar 95.78 MB 0
http://www.megaupload.com/?d=JBKI43GB VTC.QuickStart.Adobe.Illustrator.CS3.rar VTC.QuickStart.Adobe.Illustrator.CS3.rar 49.6 MB 0
http://www.megaupload.com/?d=KX0HUAD1 VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part03.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part03.rar 95.78 MB 0
http://www.megaupload.com/?d=H8XP77RD VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part15.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part15.rar 88.92 MB 0
http://www.megaupload.com/?d=8AGZG0Q3 VTC.Real.World.PHP.Programming.Basics.part3.rar VTC.Real.World.PHP.Programming.Basics.part3.rar 95.78 MB 0
http://www.megaupload.com/?d=VFYJ5X69 VTC.PHP.Project.Solutions.part1.rar VTC.PHP.Project.Solutions.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=LLOKM7T6 VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part5.rar VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part5.rar 95.78 MB 0
http://www.megaupload.com/?d=O1RDUA61 VTC.VBA.for.Excel.part1.rar VTC.VBA.for.Excel.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=SJHWB0LU VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part1.rar VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part1.rar 95.78 MB 0
http://www.megaupload.com/?d=0T2U2WQ9 VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part4.rar VTC.Adobe.After.Effect7.Rock.Solid.Foundation.Team.AG.part4.rar 95.78 MB 0
http://www.megaupload.com/?d=X7YNL98K VTC_PhotoshopCS3_CFE_ViH.part4.rar VTC_PhotoshopCS3_CFE_ViH.part4.rar 95.78 MB 0
http://www.megaupload.com/?d=5YJR1EK7 VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part12.rar VTC.MCSE.2003.Complete.Set.70_270.290.291.293.294.297.298.part12.rar 95.78 MB 0

BidVertiser

pocket cents

PocketCents Local Online Advertising