C/C++ programmer seeks C# book recommendation

E

E.T. Grey

Hi,

I have experience in the following languages:

C, C++ and Java (which BTW, C# looks suspiciously like)

I am looking for a no-nonsense, hit the ground running kinda book which
covers the following areas thoroughtly:

1). Using C++ objects exposed in a native compiled C++ library (book
must show how to catch exceptions thrown by C++ object, pass C++
functors, invoke callbacks etc.)

2). Using a C API exposed by a native compiled C (Win32) DLL - book must
explain how to pass structures, pointers and callbacks

3). Windows Forms programming

4). Deployment

5). Obfuscication


Points 4 and 5, I will be satisified with links to URLs on the web
containing this info.


I have two books in mind:

a). Windows Forms Programming in C# by Chris Sells
b). Programming Windows with C# (Core Reference) by Charles Petzold


If I have to chose one, which should it be - based on your experience?
 
O

Octavio Hernandez

Hi,

- Of the two books you mention, I'd recommend the Chris Sells book. However,
both these books written with .NET 1.1 in mind, so they do not cover the new
..NET 2.0 Windows Forms controls or Click-Once deployment...
- For the issues related to interoperability with Win32 and COM, I'd
recommend you the Andrew Troelsen book, which you can download for free from
www.apress.com.

Regards - Octavio
 
N

Nicholas Paldino [.NET/C# MVP]

Well, I doubt that you are going to get this in one book. However, see
inline:
1). Using C++ objects exposed in a native compiled C++ library (book must
show how to catch exceptions thrown by C++ object, pass C++ functors,
invoke callbacks etc.)

2). Using a C API exposed by a native compiled C (Win32) DLL - book must
explain how to pass structures, pointers and callbacks

For the above two, check out the the book by Adam Nathan titled ".NET
and COM: The Complete Interoperability Guide". You can find it at (watch
for line wrap):

http://www.amazon.com/exec/obidos/t...102-6022418-0413731?v=glance&s=books&n=507846

This book is a behemoth, but it should tell you everything you want to
know. I know it definitely does for #1. It might be a little light for #1.
However, there are samples of how to create managed wrappers for your C++
classes on the MSDN website.

You don't have an option here, as you can not use straight C++ classes
in C#. You will have to wrap them somehow, or expose them through COM.
3). Windows Forms programming

Well, you can't do better than Charles Petzold (watch for line wrap):

http://www.amazon.com/exec/obidos/t...bs_b_2_2/102-6022418-0413731?v=glance&s=books
4). Deployment

5). Obfuscication


Points 4 and 5, I will be satisified with links to URLs on the web
containing this info.

I think you will have to settle for this, since there isn't really a
good book that I know about out there which highlights these. Also,
obfuscation is more of a product offering as opposed to a technology in .NET
(as a matter of fact, there is nothing in .NET that handles obfuscation).

Hope this helps.
 
C

Christoph Nahr

1). Using C++ objects exposed in a native compiled C++ library (book
must show how to catch exceptions thrown by C++ object, pass C++
functors, invoke callbacks etc.)

Not possible in C#. If you want that you must use Managed C++ (for
..NET 1.0/1.1) or C++/CLI (for .NET 2.0). The standard reference for
MC++ is Challa/Laksberg, "Essential Guide to Managed Extensions for
C++". I don't know about C++/CLI books yet.
2). Using a C API exposed by a native compiled C (Win32) DLL - book must
explain how to pass structures, pointers and callbacks

Since you're going to use MC++ or C++/CLI anyway you can just do that
from within that language. By the way, Jeffrey Richter's "Applied
..NET Framework Programming" is the standard book on how .NET works,
and given the low level of your work you should definitely read it.
I have two books in mind:

a). Windows Forms Programming in C# by Chris Sells
b). Programming Windows with C# (Core Reference) by Charles Petzold

Both are good books on WinForms programming. You should probably get
both despite the large amount of overlap -- Sells covers less ground
but in more detail. But get Petzold first, he covers the .NET basics.

Be aware that the current editions are for .NET 1.0/1.1, and 2.0 has
greatly enhanced the C# language and WinForms. You'll have to wait
for new editions to cover 2.0.
 

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