Click here to Skip to main content
15,906,816 members
Home / Discussions / C#
   

C#

 
QuestionWhat is this C# console compile error and how do I fix it? Pin
Xarzu16-Aug-12 11:03
Xarzu16-Aug-12 11:03 
<pre lang="c#"></pre>Error 1 An object reference is required for the non-static field, method, or property 'ConsoleApplication_FileTest.Program.GetAverageSalary(string)' C:\Users\Dawn\documents\visual studio 11\Projects\ConsoleApplication_FileTest\ConsoleApplication_FileTest\Program.cs 98 24 ConsoleApplication_FileTest
<pre lang="c#"><pre>static void Main(string[] args)
{

Dictionary<string, double> averages = new Dictionary<string, double>();
string filename = "c:\\test.txt";
averages = GetAverageSalary(filename)
} </pre></pre>

=====================
<pre lang="c#"> Dictionary<string, double> GetAverageSalary(string filename)
{
... </pre>
AnswerRe: What is this C# console compile error and how do I fix it? Pin
jschell16-Aug-12 11:05
jschell16-Aug-12 11:05 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
Xarzu16-Aug-12 11:19
Xarzu16-Aug-12 11:19 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
Wes Aday16-Aug-12 11:31
professionalWes Aday16-Aug-12 11:31 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
Eddy Vluggen16-Aug-12 13:29
professionalEddy Vluggen16-Aug-12 13:29 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
Eddy Vluggen16-Aug-12 13:31
professionalEddy Vluggen16-Aug-12 13:31 
AnswerRe: What is this C# console compile error and how do I fix it? Pin
Bernhard Hiller16-Aug-12 21:19
Bernhard Hiller16-Aug-12 21:19 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
OriginalGriff16-Aug-12 21:38
mveOriginalGriff16-Aug-12 21:38 
AnswerRe: What is this C# console compile error and how do I fix it? Pin
OriginalGriff16-Aug-12 21:23
mveOriginalGriff16-Aug-12 21:23 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
BobJanova16-Aug-12 22:51
BobJanova16-Aug-12 22:51 
GeneralRe: What is this C# console compile error and how do I fix it? Pin
OriginalGriff16-Aug-12 23:41
mveOriginalGriff16-Aug-12 23:41 
AnswerRe: What is this C# console compile error and how do I fix it? Pin
Richard MacCutchan16-Aug-12 21:29
mveRichard MacCutchan16-Aug-12 21:29 
Questiongetting a method progress percentage Pin
Mostafa M.A16-Aug-12 10:29
Mostafa M.A16-Aug-12 10:29 
AnswerRe: getting a method progress percentage Pin
Eddy Vluggen16-Aug-12 10:50
professionalEddy Vluggen16-Aug-12 10:50 
GeneralRe: getting a method progress percentage Pin
Mostafa M.A16-Aug-12 11:57
Mostafa M.A16-Aug-12 11:57 
GeneralRe: getting a method progress percentage Pin
Eddy Vluggen16-Aug-12 13:26
professionalEddy Vluggen16-Aug-12 13:26 
QuestionC# code snippet for InfoPath form Pin
dmsWebDev16-Aug-12 5:12
dmsWebDev16-Aug-12 5:12 
AnswerRe: C# code snippet for InfoPath form Pin
Wes Aday16-Aug-12 5:19
professionalWes Aday16-Aug-12 5:19 
GeneralRe: C# code snippet for InfoPath form Pin
dmsWebDev16-Aug-12 5:30
dmsWebDev16-Aug-12 5:30 
QuestionDont know how to create a storage procedure to Pin
paddymega16-Aug-12 1:39
paddymega16-Aug-12 1:39 
AnswerRe: Dont know how to create a storage procedure to Pin
Shameel16-Aug-12 1:41
professionalShameel16-Aug-12 1:41 
GeneralRe: Dont know how to create a storage procedure to Pin
paddymega16-Aug-12 3:00
paddymega16-Aug-12 3:00 
QuestionRe: Dont know how to create a storage procedure to Pin
Eddy Vluggen16-Aug-12 3:12
professionalEddy Vluggen16-Aug-12 3:12 
AnswerRe: Dont know how to create a storage procedure to Pin
paddymega16-Aug-12 5:11
paddymega16-Aug-12 5:11 
GeneralRe: Dont know how to create a storage procedure to Pin
Eddy Vluggen16-Aug-12 5:24
professionalEddy Vluggen16-Aug-12 5:24 

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.