Click here to Skip to main content
15,885,880 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Need help. Hit learning barrier. Pin
Christian Graus26-Feb-07 11:09
protectorChristian Graus26-Feb-07 11:09 
Don't post programming questions in the lounge. I moved it for you.


JMOdom wrote:
"'Exercise_9_Chapter_4.Deduction.SetGrossPay(double)': not all code paths return a value"


In fact, none of them return a value. That's what the message is telling you. You wrote a function that returns double, and you didn't return anything. Add return grossPage; at the end of the function and it will work. Also, if you have const values, it's a good idea to put them at the top, the whole point is that you can easily change them. Putting them in the function, you may as well hard code the value.


JMOdom wrote:
'Exercise_9_Chapter_4.Deduction.netPay' is inaccessible due to its protection level",


This means that netPay is private or protected. You should use public properties to expose private or protected members. You should expose only a get method if at all possible. Oh - if you didn't put an access modifier, it's private by default. What I mean is:

int n;

is private.

public int n;

is public, but you should instead do this:

private int _n;

public int N {
{
get { return _n; }
// set { _n = value; }
}

and only uncomment/add the set if you have to.

JMOdom wrote:
and that SetNetPay is "The name 'SetNetPay' does not exist in the current context".


You've not shown us any code which involves a method called SetNetPay, so I can only assume this error is correct ( the method does not exist )

JMOdom wrote:
I have no idea as how to correct these problems


I'm happy to help, but in each case, the compiler has told you what is wrong. As I help you through these issues, take note of what the terminology is, so you can learn how to use the error messages to work out how to fix your code Smile | :)




Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

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 
GeneralRe: Switch between two properties Pin
daniel9926-Feb-07 9:04
daniel9926-Feb-07 9:04 

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.