Click here to Skip to main content
15,902,861 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to get the instance of a running process ? Pin
Sandeep Akhare26-Feb-07 19:24
Sandeep Akhare26-Feb-07 19:24 
AnswerRe: How to get the instance of a running process ? Pin
Sven Cipido26-Feb-07 20:57
Sven Cipido26-Feb-07 20:57 
AnswerRe: How to get the instance of a running process ? Pin
wasife26-Feb-07 23:26
wasife26-Feb-07 23:26 
AnswerRe: How to get the instance of a running process ? Pin
Martin#26-Feb-07 23:38
Martin#26-Feb-07 23:38 
QuestionCreate FTP Site from website Pin
LoneWolfAGQ226-Feb-07 13:04
LoneWolfAGQ226-Feb-07 13:04 
AnswerRe: Create FTP Site from website Pin
mike montagne26-Feb-07 13:27
mike montagne26-Feb-07 13:27 
QuestionRe: Create FTP Site from website Pin
LoneWolfAGQ227-Feb-07 8:11
LoneWolfAGQ227-Feb-07 8:11 
GeneralNeed help. Hit learning barrier. [modified] Pin
JMOdom26-Feb-07 10:58
JMOdom26-Feb-07 10:58 
Sniff | :^) I am trying to learn C# in a classroom setting. I have hit a barrier in trying to understand something.

In the following code sample under where it says weeklySalesAmount I get the message "The name 'weeklySalesAmount' does not exist in the current context". And under the mutators section where it says SetGrossPay it tells me "'Exercise_9_Chapter_4.Deduction.SetGrossPay(double)': not all code paths return a value"


public Deduction(string empName, double weeklySales)<br />
{<br />
  name = empName;<br />
  weeklySalesAmount = weeklySales;<br />
}<br />
<br />
//MUTATORS:<br />
public double SetGrossPay(double weeklySales)<br />
{<br />
   const double GROSS_WEEKLY_PAY = .07;<br />
    grossPay = weeklySales * GROSS_WEEKLY_PAY;<br />
}


In the next section where it says .netPay I'm told that "'Exercise_9_Chapter_4.Deduction.netPay' is inaccessible due to its protection level",and that SetNetPay is "The name 'SetNetPay' does not exist in the current context".


Deduction employee = new Deduction(empName, wkSales);<br />
     employee.netPay = SetNetPay();


I thought that I had everything done correctly according to the book. I have no idea as how to correct these problems. If anyone can help me, or at least steer me in the right direction, it would be muchly appreciated. Thank you.Rose | [Rose] Confused | :confused: Blush | :O








-- modified at 17:04 Monday 26th February, 2007
GeneralRe: Need help. Hit learning barrier. Pin
Christian Graus26-Feb-07 11:09
protectorChristian Graus26-Feb-07 11:09 
GeneralRe: Need help. Hit learning barrier. Pin
DavidNohejl26-Feb-07 11:13
DavidNohejl26-Feb-07 11:13 
GeneralRe: Need help. Hit learning barrier. Pin
JMOdom26-Feb-07 17:24
JMOdom26-Feb-07 17:24 
QuestionDeriving genric class from another custom generic... two signatures, which is correct ... lets see some sharpness [modified] Pin
clooge26-Feb-07 10:31
clooge26-Feb-07 10:31 
AnswerRe: Deriving genric class from another custom generic... two signatures, which is correct ... lets see some sharpness Pin
Ed.Poore26-Feb-07 12:21
Ed.Poore26-Feb-07 12:21 
GeneralRe: Deriving genric class from another custom generic... two signatures, which is correct ... lets see some sharpness Pin
clooge27-Feb-07 4:32
clooge27-Feb-07 4:32 
GeneralRe: Deriving genric class from another custom generic... two signatures, which is correct ... lets see some sharpness Pin
Martin#27-Feb-07 5:03
Martin#27-Feb-07 5:03 
QuestionOpenFileDialog Pin
slaiser26-Feb-07 10:14
slaiser26-Feb-07 10:14 
AnswerRe: OpenFileDialog Pin
Elina Blank26-Feb-07 11:02
sitebuilderElina Blank26-Feb-07 11:02 
QuestionFirst Time Crystal report user ! Pin
mrkeivan26-Feb-07 9:59
mrkeivan26-Feb-07 9:59 
AnswerRe: First Time Crystal report user ! Pin
Sylvester george26-Feb-07 18:58
Sylvester george26-Feb-07 18:58 
AnswerCrystal Report in .Net is not Complex. Pin
Binod K26-Feb-07 19:05
Binod K26-Feb-07 19:05 
QuestionSwitch between two properties [modified] Pin
daniel9926-Feb-07 8:17
daniel9926-Feb-07 8:17 
AnswerRe: Switch between two properties Pin
Christian Graus26-Feb-07 8:24
protectorChristian Graus26-Feb-07 8:24 
GeneralRe: Switch between two properties Pin
daniel9926-Feb-07 8:39
daniel9926-Feb-07 8:39 
GeneralRe: Switch between two properties Pin
Pete O'Hanlon26-Feb-07 8:48
mvePete O'Hanlon26-Feb-07 8:48 
GeneralRe: Switch between two properties Pin
Christian Graus26-Feb-07 8:55
protectorChristian Graus26-Feb-07 8:55 

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.