I'm trying to inherit from System.Diagnost ics.ProcessThre ad but I keep
getting the same error no matter what I try:The namespace 'CSRSystem'
already contains a definition for 'Program'
None of these pieces of code work:
using System.Diagnost ics;
namespace CSRSystem {
class Program : ProcessThread{
}
}
using System.Diagnost ics;
namespace CSRSystem {
class Program : ProcessThread{
Program() { }
}
}
using System.Diagnost ics;
namespace CSRSystem {
class Program : ProcessThread{
Program() : base() { }
}
}
I can't understand why the first one doesn't work. It's a public class,
there's nothing in the documentation about not being allowed to inherit
from it. I'm trying to get at the protected events member of this
class, hoping it will give me what I'm looking for.
Maybe there's a better solution to my problem. I'm trying to respond to
a button click. The problem is that the button click is happening in
another program that I didn't write, and don't have the source code
for. Any solutions for the inheritance problem or the button click
problem on a whole?
getting the same error no matter what I try:The namespace 'CSRSystem'
already contains a definition for 'Program'
None of these pieces of code work:
using System.Diagnost ics;
namespace CSRSystem {
class Program : ProcessThread{
}
}
using System.Diagnost ics;
namespace CSRSystem {
class Program : ProcessThread{
Program() { }
}
}
using System.Diagnost ics;
namespace CSRSystem {
class Program : ProcessThread{
Program() : base() { }
}
}
I can't understand why the first one doesn't work. It's a public class,
there's nothing in the documentation about not being allowed to inherit
from it. I'm trying to get at the protected events member of this
class, hoping it will give me what I'm looking for.
Maybe there's a better solution to my problem. I'm trying to respond to
a button click. The problem is that the button click is happening in
another program that I didn't write, and don't have the source code
for. Any solutions for the inheritance problem or the button click
problem on a whole?
Comment