Learning C# (2)

V

vicmann

1. When to derive a class from IDisposable?

2. Does the statement below indicate that "MyDisposable" is an abstract
class that needs its children classes to implement methods and all objects
of children classes will be "Disposable"?

public abstract class MyDisposable : IDisposable

3. What does this mean by adding "abstract object" in front of a member
method?

protected abstract object EatFood()


4.Often seeing "A first chance exception of type..."

What's the meaning of first chance exception?

5. If see a signed number like -31345712, show it be converted to hex number
so that its meaning can be interpreted by searching MSDN, or use the signed
number directly?

Thanks for your help!
 
C

Chris Fulstow

1. IDisposable is an interface rather than a base class, so the
terminology is to "implement" IDisposable, rather than "derive" from
it. You'd implement IDisposable if your class needed to explicitly
release unmanaged resources. Managed resources are handled
automatically by the .NET garbage collector.

2. Yes

3. An abstract method is a method of a base class that provides no
implementation and must be overriden by a derived class.

4. Explained here: http://support.microsoft.com/kb/105675

5. You might put the number in quotes if your search engine uses "-" to
exclude search terms, as Google does.
 
C

CuriousGeorge

Vicmann,

Whats the deal here? Are you really just picking this up or do you have an
assignment to do?

If it's the former, given the number and type of questions you have I would
suggest that you need to get a good book. I strongly recommend [1].

If it's the latter, do your own homework.

[1]
http://www.oreilly.com/catalog/csharpess2/
 
M

Michel Leunen

CuriousGeorge said:

This edition dates from 2002 according to O'Reilly's site. There were a
lot of changes in the language and in the .NET framework since its
release. Is it really still worth buying it?

Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------
 
C

CuriousGeorge

totally and completely.

Michel Leunen said:
CuriousGeorge said:

This edition dates from 2002 according to O'Reilly's site. There were a
lot of changes in the language and in the .NET framework since its
release. Is it really still worth buying it?

Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------
 

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