Click here to Skip to main content
16,004,924 members
Home / Discussions / C#
   

C#

 
GeneralRe: can any one tell me whats wrong in this code? Pin
ademsandeepreddy17-Jul-07 8:28
ademsandeepreddy17-Jul-07 8:28 
GeneralRe: can any one tell me whats wrong in this code? Pin
Suj_7817-Jul-07 8:35
Suj_7817-Jul-07 8:35 
GeneralRe: can any one tell me whats wrong in this code? Pin
Luc Pattyn17-Jul-07 14:10
sitebuilderLuc Pattyn17-Jul-07 14:10 
AnswerRe: can any one tell me whats wrong in this code? Pin
kubben17-Jul-07 8:15
kubben17-Jul-07 8:15 
AnswerRe: can any one tell me whats wrong in this code? Pin
Larantz17-Jul-07 8:17
Larantz17-Jul-07 8:17 
AnswerRe: can any one tell me whats wrong in this code? Pin
PhilDanger17-Jul-07 8:46
PhilDanger17-Jul-07 8:46 
AnswerRe: can any one tell me whats wrong in this code? Pin
Clinkz17-Jul-07 9:01
Clinkz17-Jul-07 9:01 
AnswerRe: can any one tell me whats wrong in this code? Pin
shrapnel_indie17-Jul-07 9:57
shrapnel_indie17-Jul-07 9:57 
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-
AnswerRe: can any one tell me whats wrong in this code? Pin
aztekka17-Jul-07 10:02
aztekka17-Jul-07 10:02 
QuestionConcerning "Open with..." functionality Pin
Sepharo17-Jul-07 8:12
Sepharo17-Jul-07 8:12 
AnswerRe: Concerning "Open with..." functionality Pin
Sepharo17-Jul-07 8:18
Sepharo17-Jul-07 8:18 
AnswerRe: Concerning "Open with..." functionality Pin
PIEBALDconsult17-Jul-07 8:47
mvePIEBALDconsult17-Jul-07 8:47 
GeneralRe: Concerning "Open with..." functionality Pin
Sepharo17-Jul-07 8:56
Sepharo17-Jul-07 8:56 
GeneralRe: Concerning "Open with..." functionality Pin
PIEBALDconsult17-Jul-07 9:12
mvePIEBALDconsult17-Jul-07 9:12 
GeneralRe: Concerning "Open with..." functionality Pin
Sepharo17-Jul-07 9:21
Sepharo17-Jul-07 9:21 
GeneralRe: Concerning "Open with..." functionality Pin
PIEBALDconsult17-Jul-07 9:21
mvePIEBALDconsult17-Jul-07 9:21 
QuestionXML Hell Pin
Raymond_P*17-Jul-07 7:58
Raymond_P*17-Jul-07 7:58 
AnswerRe: XML Hell Pin
Larantz17-Jul-07 8:14
Larantz17-Jul-07 8:14 
GeneralRe: XML Hell Pin
PIEBALDconsult17-Jul-07 8:23
mvePIEBALDconsult17-Jul-07 8:23 
GeneralRe: XML Hell Pin
MidwestLimey17-Jul-07 11:39
professionalMidwestLimey17-Jul-07 11:39 
JokeRe: XML Hell Pin
PIEBALDconsult17-Jul-07 11:53
mvePIEBALDconsult17-Jul-07 11:53 
AnswerRe: XML Hell Pin
PIEBALDconsult17-Jul-07 8:14
mvePIEBALDconsult17-Jul-07 8:14 
QuestionRun Appliction as a Different User (Programatically) Pin
Muhammad Nauman Yousuf17-Jul-07 7:35
Muhammad Nauman Yousuf17-Jul-07 7:35 
AnswerRe: Run Appliction as a Different User (Programatically) Pin
Ravi Bhavnani17-Jul-07 17:18
professionalRavi Bhavnani17-Jul-07 17:18 
GeneralRe: Run Appliction as a Different User (Programatically) Pin
Muhammad Nauman Yousuf17-Jul-07 17:53
Muhammad Nauman Yousuf17-Jul-07 17:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.