Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

jowecape

@jowecape
About
Posts
4
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Auto Run Procedures In Windows App
    J jowecape

    Why don't u use threads to run your code. You can use your time to control the different threads in your app.

    C# database help csharp debugging announcement

  • Writing xml file from dataset
    J jowecape

    I am also having a problem like that. I have have an XML file, and i created a key in the XML Schema. My problem is that if i load my xml file into a dataset and try to "find[primary]", the compiler generates an exception that there is no primary key defined. Can u help?

    C# database xml tutorial question

  • Delegates and Events Problem
    J jowecape

    Sorry for that. this is my first time posting. //From BankAccount.cs using System; using System.Collections.Generic; using System.Text; namespace Delegates_and_Events { public delegate void myEventDelegate(); class BankAccount { public static long Balance; public event myEventDelegate myEvent; public void WithDraw(long amount) { Balance -= amount; myEvent(); } } } //from frmMain.cs private void Form1_Load(object sender, EventArgs e) { BankAccount myAcc = new BankAccount(); BankAccount.Balance = 1000; myAcc.myEvent += new myEventDelegate(OnWithDraw); } public void OnWithDraw() { if (BankAccount.Balance < 0) { MessageBox.Show("Account Overdrawn"); } } I also have a textbox where i am getting the value which i subtract using the following private void btnWithDraw_Click(object sender, EventArgs e) { BankAccount myAcc = new BankAccount(); myAcc.WithDraw(long.Parse(txtAmount.Text)); txtBankBalance.Text = BankAccount.Balance.ToString(); }

    C# help question

  • Delegates and Events Problem
    J jowecape

    I have created a class called BankAccount. the samle is a floows public delegate void myEventDelegate(); class BankAccount { public static long Balance; public event myEventDelegate myEvent; public void WithDraw(long amount) { Balance -= amount; myEvent(); } } i then wired my event in the frm load to an event handler "OnWithdraw" i also a textbox where by i subtract the money to be withdrawn from the account. The method display an event to the user when the account bal < 0; when i run the program i receiven a NullArgumentException error on the "myEvent" int BankAccount class how do i make my event work?

    C# help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups