473,387 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Practicla .NET2 and C#2

Hi,

I've just released the book Practical .NET2 and C#2. More info is available
on the site http://www.PracticalDOT.NET

You can download sample chapters about CLR, Security, Threading/Synchro and
some C#2 features here:
http://www.practicaldot.net/en2/Sample.htm

Here is a link to some reviews:
http://www.practicaldot.net/en2/Reviews.htm

You can browse the 647 directly usable code examples here:
http://www.practicaldot.net/en2/SiteMap.htm

Thanks for your attention,
Patrick Smacchia
MVP.NET
Mar 16 '06 #1
7 1770


Patrick Smacchia wrote:
You can download sample chapters about CLR, Security, Threading/Synchro and
some C#2 features here:
http://www.practicaldot.net/en2/Sample.htm


What's up with the try...finally? in (i.e.)
http://www.practicaldot.net/en2/Chap...sting_5_6.htm:

try{
Monitor.Enter( typeof( Program ) );
counter *= counter;
}
finally{ Monitor.Exit( typeof( Program ) ); }

If Monitor.Enter throws you shouldn't Monitor.Exit.

Monitor.Enter(m);
try {
// do stuff
} finally {
Monitor.Exit(m);
}

would be better.

--
Helge Jensen
mailto:he**********@slog.dk
sip:he**********@slog.dk
-=> Sebastian cover-music: http://ungdomshus.nu <=-
Mar 16 '06 #2


Patrick Smacchia wrote:
You can download sample chapters about CLR, Security, Threading/Synchro and
some C#2 features here:
http://www.practicaldot.net/en2/Sample.htm


What's with the unnessesary up-casting, (i.e)
http://www.practicaldot.net/en2/Chap...ing_12_10.htm:

interface IA { void f( int i ); }
interface IB { void f( int i ); }
abstract class FooBase { public abstract void f(int i); }
class FooDerived : FooBase, IA, IB { ... }
...

FooDerived refImpl = new FooDerived();
FooBase refAbst = (FooBase) refImpl;
^^^^^^^^^------------ what's this for?
IA refA = (IA) refImpl;
IB refB = (IB) refImpl;
^^^^-------------- what are these for?

--
Helge Jensen
mailto:he**********@slog.dk
sip:he**********@slog.dk
-=> Sebastian cover-music: http://ungdomshus.nu <=-
Mar 16 '06 #3
Hope you had a good proof reader - unlike for your post :-)

"Patrick Smacchia" <pa*****@smacchia.com> wrote in message
news:ea**************@TK2MSFTNGP11.phx.gbl...
Hi,

I've just released the book Practical .NET2 and C#2. More info is
available on the site http://www.PracticalDOT.NET

You can download sample chapters about CLR, Security, Threading/Synchro
and some C#2 features here:
http://www.practicaldot.net/en2/Sample.htm

Here is a link to some reviews:
http://www.practicaldot.net/en2/Reviews.htm

You can browse the 647 directly usable code examples here:
http://www.practicaldot.net/en2/SiteMap.htm

Thanks for your attention,
Patrick Smacchia
MVP.NET

Mar 16 '06 #4
Good remark, I take note for future edition.

What's with the unnessesary up-casting, (i.e)
http://www.practicaldot.net/en2/Chap...ing_12_10.htm:

interface IA { void f( int i ); }
interface IB { void f( int i ); }
abstract class FooBase { public abstract void f(int i); }
class FooDerived : FooBase, IA, IB { ... }
...

FooDerived refImpl = new FooDerived();
FooBase refAbst = (FooBase) refImpl;
^^^^^^^^^------------ what's this for?
IA refA = (IA) refImpl;
IB refB = (IB) refImpl;
^^^^-------------- what are these for?

--
Helge Jensen
mailto:he**********@slog.dk
sip:he**********@slog.dk
-=> Sebastian cover-music: http://ungdomshus.nu <=-

Mar 16 '06 #5
Good remark, I take note for future edition.

"Helge Jensen" <he**********@slog.dk> a écrit dans le message de news:
eL***************@TK2MSFTNGP09.phx.gbl...


Patrick Smacchia wrote:
You can download sample chapters about CLR, Security, Threading/Synchro
and
some C#2 features here:
http://www.practicaldot.net/en2/Sample.htm


What's up with the try...finally? in (i.e.)
http://www.practicaldot.net/en2/Chap...sting_5_6.htm:

try{
Monitor.Enter( typeof( Program ) );
counter *= counter;
}
finally{ Monitor.Exit( typeof( Program ) ); }

If Monitor.Enter throws you shouldn't Monitor.Exit.

Monitor.Enter(m);
try {
// do stuff
} finally {
Monitor.Exit(m);
}

would be better.

--
Helge Jensen
mailto:he**********@slog.dk
sip:he**********@slog.dk
-=> Sebastian cover-music: http://ungdomshus.nu <=-

Mar 16 '06 #6
"Patrick Smacchia" <pa*****@smacchia.com> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
Good remark, I take note for future edition.


Is the rest of your book as bad as your code samples would suggest...?
Mar 16 '06 #7
Your conclusion is a bit quick. Do you know a perfect software 900 pages
book?

Do you know any other .NET 2.0 book which cover all these new 2.0 features:
http://www.codeproject.com/books/net...ewfeatures.asp

Do you know any other .NET book which cover advanced features like (I just
quote some features covered in sample chapters available at
http://www.practicaldot.net/en2/Sample.htm):
-->CLR runtime host
-->CLR profiling
-->GC internals
-->Constrained Execution Region/Critical Finalizers
-->Monitor Wait/Pulse/PulseAll
-->Synchronization Domains
-->Thread Local Storage
-->Execution context
-->Basics of symmetric and asymmetric algorithm
-->Data Protection API
-->Basics of authenticode
-->C#2 fixed arrays
-->C#2 facilities to cop with strings and pointers
-->Exception handling and the CLR
-->C#2 anonymous method under the hood
-->C#2 iterator under the hood


"Mark Rae" <ma**@markN-O-S-P-A-M.co.uk> a écrit dans le message de news:
%2****************@TK2MSFTNGP10.phx.gbl...
"Patrick Smacchia" <pa*****@smacchia.com> wrote in message
news:en**************@TK2MSFTNGP14.phx.gbl...
Good remark, I take note for future edition.


Is the rest of your book as bad as your code samples would suggest...?

Mar 16 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Scott H | last post by:
I spent most of yesterday looking into this, and still didn't really find an answer... I have a .NET2.0 app that I need to install on a server, and then possibly several other servers later, it...
2
by: bb | last post by:
i use the losformatter to serialise a hashtable and the store in the database. (i save some urls so they can be reconstructed) we have moved the project from asp.net1 to asp.net2 now whenever...
2
by: D. Shane Fowlkes | last post by:
ASP.NET 2 (VB) I'm experimenting with MS VWD and .NET2. I'm tinkering with the Code Behind method as demonstrated on MS's tutorial at...
2
by: Patrick Smacchia | last post by:
Hi, I've just released the book Practical .NET2 and C#2. More info is available on the site http://www.PracticalDOT.NET You can download sample chapters about CLR, Security, Threading/Synchro...
1
by: Winista | last post by:
I have a library that reads PDF file and manipilates its content. And I use SharpZip library to decompress the streams included in PDF file. All well and good. I have 3 lines of my test code that...
4
by: hvj | last post by:
I need to run a .NET1.1 program in a .NET2.0 CLR. The .NET1.1 exe starts correctly in .NET2.0. Now I want to debug in Visual Studio 2005. But when I try to open the .NET1.1 project, Visual Studio...
4
by: InnoCreate | last post by:
Hi everyone, I've developed a couple of asp.net1.1 websites and these are viewable using my mobile phone. I've now moved over to asp.net2 and i'm unable to view asp.net2 websites on my phone. I've...
0
by: Groove | last post by:
(repost!) I have a simple and common scenario. I'm developing pages in VWD and FTP-ing them over to a test servr running Window 2003, NET2 Framework. On my page, I have a DDL that causes a...
4
by: dreamamit2001 | last post by:
Hi, I would like to know the ASP.NET2.0's(Controls, Menubar, Validations, Object Data Souce Controls, Treeview Control) compatibility with IE5.0 browser on Mac OS. If I don't use Client side...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.