Rusted, actually. But the results are the same (bad). LOL.
Hi guys,
I have the error "An object reference is required for the nonstatic field,
method, or property 'CoachLibrary.emailSender.checkBeforeSend(string)'" in
this class. Any hint gonna be welcome... =$
The method checkBeforeSend is something I didn't work on and was working
before.
Thanks a lot.
______________________________________________________
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CoachLibrary;
namespace User_Mode
{
public partial class Default : Form
{
emailSender emailsender = new emailSender();
public Default()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
emailSender.checkBeforeSend("exa");
}
}
}
> Rusted, actually. But the results are the same (bad). LOL.
>
[quoted text clipped - 4 lines]
> The method checkBeforeSend is something I didn't work on and was working
> before.
It's a casing problem. emailSender is the name of the class
(contravening .NET naming conventions, I might add) whereas emailsender
(lower-case s) is the name of the field.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Carlos Sosa Albert - 07 Jun 2007 13:54 GMT
LOL, you were right.
And yes... I know about the name convention. That was one of the reasons I
pointed it was not my work... ;)
Thanks a lot Jon!
>> Rusted, actually. But the results are the same (bad). LOL.
>>
[quoted text clipped - 10 lines]
> (contravening .NET naming conventions, I might add) whereas emailsender
> (lower-case s) is the name of the field.