CSharp Source Code

S

shilpichaudhry

Hi:
I am trying to inherit a class from the C# class, and override a
method, but before I can start coding, I need to know what goes on in
the C# method, before I can make any corresponding changes to my
method,
is there any place from where I can get the C# code for that class.

specifically I am looking for ErrorProvider class and method is
SetIconAlignment.

Thanks, shilpi
 
L

Larry Smith

I am trying to inherit a class from the C# class, and override a
method, but before I can start coding, I need to know what goes on in
the C# method, before I can make any corresponding changes to my
method,
is there any place from where I can get the C# code for that class.

specifically I am looking for ErrorProvider class and method is
SetIconAlignment.

You have to rely on the documentation for that class. It's the only official
source. Unfortunately, the .NET docs are very weak IMO (due to lack of
sufficient info).
 
A

Andy

Hi:
I am trying to inherit a class from the C# class, and override a
method, but before I can start coding, I need to know what goes on in
the C# method, before I can make any corresponding changes to my
method,
is there any place from where I can get the C# code for that class.

Hmm, techincally you should not need to know how the class is
implemented. That would break encapsulation. If the superclass'
implemenation changes, it would then break your subclass, which is not
good.
specifically I am looking for ErrorProvider class and method is
SetIconAlignment.

if you really need to peek that that code, you can use Reflector from
Loeder. This program allows you to inspect assemblies, and
disassemble code.
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

I am trying to inherit a class from the C# class, and override a
method, but before I can start coding, I need to know what goes on in
the C# method, before I can make any corresponding changes to my
method,
is there any place from where I can get the C# code for that class.

As other has stated, then the approach is bad.

When MS changes something then your code may break.

If you want to go ahead, then find a decompiler like
Reflector.FileDisassembler.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top