Click here to Skip to main content
15,887,428 members
Home / Discussions / C#
   

C#

 
AnswerRe: auto sleep/wakeup windows 7 at specified times Pin
lordrt16-Aug-12 5:38
lordrt16-Aug-12 5:38 
QuestionHaving Problem with small Function Pin
computerpublic15-Aug-12 8:11
computerpublic15-Aug-12 8:11 
AnswerRe: Having Problem with small Function Pin
Dave Kreskowiak15-Aug-12 8:14
mveDave Kreskowiak15-Aug-12 8:14 
GeneralRe: Having Problem with small Function Pin
computerpublic15-Aug-12 9:06
computerpublic15-Aug-12 9:06 
GeneralRe: Having Problem with small Function Pin
Wes Aday15-Aug-12 9:43
professionalWes Aday15-Aug-12 9:43 
GeneralRe: Having Problem with small Function Pin
harold aptroot15-Aug-12 10:20
harold aptroot15-Aug-12 10:20 
AnswerRe: Having Problem with small Function PinPopular
Bernhard Hiller15-Aug-12 22:54
Bernhard Hiller15-Aug-12 22:54 
AnswerRe: Having Problem with small Function Pin
DaveyM6916-Aug-12 1:37
professionalDaveyM6916-Aug-12 1:37 
I think it's been explained pretty well already, but just in case...

static methods are available without an instance of the class. Non static methods are only available through an instance of the class.

This gives you two options in your case. Either
1. Make the Test method static
C#
public static Double Test(Double Val1, Double Val2, Double Val3)

or

2. Create a new instance of the class that holds the method (Program in this case).
C#
Double Result = new Program().Test(A,B,C);

alternative
C#
Program program = new Program();
Double Result = program.Test(A,B,C);

Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



QuestionDelegate w/ Lambda Pin
Herrwolf115-Aug-12 4:43
Herrwolf115-Aug-12 4:43 
AnswerRe: Delegate w/ Lambda Pin
BobJanova15-Aug-12 5:04
BobJanova15-Aug-12 5:04 
GeneralRe: Delegate w/ Lambda Pin
Eddy Vluggen15-Aug-12 5:19
professionalEddy Vluggen15-Aug-12 5:19 
GeneralRe: Delegate w/ Lambda Pin
Herrwolf115-Aug-12 8:54
Herrwolf115-Aug-12 8:54 
AnswerRe: Delegate w/ Lambda Pin
Dave Doknjas15-Aug-12 10:21
Dave Doknjas15-Aug-12 10:21 
GeneralRe: Delegate w/ Lambda Pin
Herrwolf115-Aug-12 10:54
Herrwolf115-Aug-12 10:54 
QuestionSending SMS through ASP.NET Pin
komalridda14-Aug-12 20:00
komalridda14-Aug-12 20:00 
AnswerRe: Sending SMS through ASP.NET Pin
OriginalGriff14-Aug-12 20:42
mveOriginalGriff14-Aug-12 20:42 
AnswerCross Post Pin
DaveyM6914-Aug-12 23:24
professionalDaveyM6914-Aug-12 23:24 
AnswerRe: Sending SMS through ASP.NET Pin
Keith Barrow15-Aug-12 2:08
professionalKeith Barrow15-Aug-12 2:08 
QuestionSave Excel File Pin
Member 916988714-Aug-12 15:21
Member 916988714-Aug-12 15:21 
AnswerRe: Save Excel File Pin
Dave Kreskowiak14-Aug-12 18:13
mveDave Kreskowiak14-Aug-12 18:13 
AnswerRe: Save Excel File Pin
Eddy Vluggen15-Aug-12 1:23
professionalEddy Vluggen15-Aug-12 1:23 
QuestionAbout SerialPort Pin
SODMi14-Aug-12 15:18
SODMi14-Aug-12 15:18 
AnswerRe: About SerialPort Pin
Roger Wright14-Aug-12 20:08
professionalRoger Wright14-Aug-12 20:08 
QuestionWeb Scraping XML file Pin
mjackson1114-Aug-12 8:23
mjackson1114-Aug-12 8:23 
AnswerRe: Web Scraping XML file Pin
PIEBALDconsult14-Aug-12 9:53
mvePIEBALDconsult14-Aug-12 9: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.