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
S

shrapnel_indie

@shrapnel_indie
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • can any one tell me whats wrong in this code?
    S shrapnel_indie

    Ok, after looking at your code, AND the other replies, there are areas that do have real problems. LOGICAL ERROR: public string acctype { get { return _acctype; } set { if (_acctype = "savings" || _acctype = "current") { _acctype = value; } else { _acctype = ""; } } } In your test, you are assigning the strings to _acctype, what you accomplish will not be what you want, as _acctype will always be assigned the contents of value. QUESTIONABLE on what you are attempting to do: public int credit(_balance , _amount) { return _balance + _amount; } public int debit(_balance , _amount) { return _balance - _amount; } you are overriding the internal private class variables _balance and _amount with what you pass in as _balance and _amount. Im not sure what you intended to do here. Is the class variable _amount needed? Are you trying to update _balance, or are you just attempting to deliver the would be changes just for the values or to update externally? -Later! -WB-

    C# 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