|
Here's the Amazon Review of the 2nd edition:
I thoroughly enjoyed the first edition, but as another reviewer stated, it was a one-time read where you could easily absorb everything in one sitting and not have much need for it again. This edition simply rocks. I don't know if it was Mr Archer learning more about the language or adding Mr Whitechapel. What I do know is that this book as some incredible content.
Where do I begin? The chapters on attributes, delegates and interfaces are excellent. Finally, someone that explains what these are, why they exist, how to use them and how they work internally! From there, my favorite chapters are the ones on file streams, strings and regular expressions and security...
Finally, the COM interop chapters are the best I've read any place. This has become *the* definitive book on C#. A definite recommended buy!
--------------------------------------------------------------------------
I advise you to buy this one , and complement with Petzold Programming Windows with C# . These 2 definitely are a great pair ...
The inside C# leads properly with the language and it's internals and some complementary .Net Framework stuff and Programming Windows leads with Windows Forms , GDI + , Graphical user interfaces ... you get the point ...
For Asp.NET , I personnally don't know any good introductory book, but if you want a intermediate/Advanced level book then definitely you should go to ASP.NET Unleashed.
Cheers,
Joao Vaz
Addicted C++ programmer
|
|
|
|
|
Joao Vaz wrote:
I advise you to buy this one , and complement with Petzold Programming Windows with C# . These 2 definitely are a great pair ...
I definitely like the idea that Amazon thinks enough of my book's potential to couple with Charles Petzold's book - especially since they work great together.
Cheers,
Tom Archer
Author - Inside C#, Visual C++.NET Bible
|
|
|
|
|
Tom Archer wrote:
Amazon thinks enough of my book's potential to couple with Charles Petzold's book
Yeah, Amazon despict some minor issues on his search engine , have some intelligent guys backing it up
Cheers,
Joao Vaz
Addicted C++ programmer
|
|
|
|
|
The MS-Press books listed are, I think, essential titles for any .Net dev.
The 4 MS-Press publications listed previously are pretty good (well I anticipate that Prosise's title will be as well written).
I also look forward to getting my copy of the 2nd edition of Tom's book and also Jeff Prosise's book when its published (this month?).
I am however disappointed with the Developmentor .Net/C# efforts compared with their previous Win32/COM publications. I don't bother using them any more to be honest. That said though, the upcoming Don Box title from them "Essential .NET" looks promising (drafts were available at last years PDC) but has been delayed until September which is a shame.
The Wrox press titles are also disappointing and try to cover far too much - Professional C# meanders all over the place.
Kev
|
|
|
|
|
kek wrote:
The Wrox press titles are also disappointing and try to cover far too much - Professional C# meanders all over the place.
I know what you mean, I bought Beginning Asp.NET and it have TEN chapters about C# basics !!!
But I bought ASP.NET Unleashed from SAMS and it only have a tiny chapter to the basics of ASP.NET , then is all real content , the book have 1300 pags!!!! Great stuff !
kek wrote:
Developmentor .Net/C# efforts compared with their previous Win32/COM publications
Yeap , their Win32/COM publications rocked , but I believe that they will increase the quality in upcoming books, I have faith in the guys !!!
Regarding Essential .NET, I'm afraid by the time , it hit the shelfs , it will not bring additional content to the hundreds of books published !!! Although Don Box is a great author(Essential COM was a masterpiece) , I think that he will have poor sales .
I already have the Mspress Guys Tom Archer(Inside C#,2nd), Serge Lidin(Inside Il Net Assembler), Petzold(Programming Windows with C#) ,Prosise (Programming .Net ...) , Ritcher (Applied Net...) , Dino Esposito (Ado.NET) , Stephen W ...(ASP.NET Unleashed) ,John Gough (Compiling For .NET) and many others !!! How he can bring additional content ???? I think is almost impossible to achieve this !!!
|
|
|
|
|
Anonymous wrote:
Although Don Box is a great author(Essential COM was a masterpiece) , I think that he will have poor sales .
I think people learning .NET coming from the COM world will pick up Box's book to because its Don Box. Hell, I'm not from the COM world and I'm tempted to get it when it comes out
James
Simplicity Rules!
|
|
|
|
|
Inside C#, 2nd Edition
Even Amazon recommends and are selling the Inside C# and Programming Windows with C# together at a lower price, so you can't go wrong
Cheers,
Joao Vaz
Addicted C++ programmer
|
|
|
|
|
Depends on what you're trying to do.
If you're interested in the just the language, Tom's book or my book from Apress.
If you're interested in fewer details about the language but more about the frameworks, I think Troelson's Apress book or Liberty's O'Reilly book are good.
You might also look on http://www.dotnetbooks.com for some more info.
|
|
|
|
|
Is there a reason why when accessing the TreeNode.Text property is slows down the redraw of a treeview and it doesn't even take in consideration the BeginUpdate/EndUpdate of the TreeView???
In this example if you comment out the "NewNode.Text" line the
BeginUpdate/EndUpdate will work fine
TreeNode NewNode;
treeView.BeginUpdate();
for( int i = 0; i < 1000; i++ )
{
NewNode = treeView.Nodes.Add( "Node: " + i.ToString() );
NewNode.Text = "Node: " + i.ToString();
Application.DoEvents();
}
treeView.EndUpdate();
And in this example if you comment ou the "NewNode.Text" line the tree view will repaint alot faster.
TreeNode NewNode;
for( int i = 0; i < 1000; i++ )
{
NewNode = treeView.Nodes.Add( "Node: " + i.ToString() );
NewNode.Text = "Node: " + i.ToString();
Application.DoEvents();
}
|
|
|
|
|
Serge R wrote:
Is there a reason why when accessing the TreeNode.Text property is slows down the redraw of a treeview and it doesn't even take in consideration the BeginUpdate/EndUpdate of the TreeView???
In this example if you comment out the "NewNode.Text" line the
BeginUpdate/EndUpdate will work fine
I'm not sure what you are trying to do; the point of BeginUpdate/EndUpdate is to not-redraw the treeview while populating nodes making it faster because you won't redraw after each addition/removal. When you put in the Application.DoEvents() and by setting the text value you are telling it to redraw.
Nearest I can tell that is the culprit.
James
Simplicity Rules!
|
|
|
|
|
James T. Johnson wrote:
I'm not sure what you are trying to do
If it takes 5 min to load the tree I want to be able to move the window around without using a thread so I use Application.DoEvents()...
The best example is that I'm trying to do something like this product for myself: www.jamsoft.net/treesize.html
|
|
|
|
|
Comparing the source from MFC and the source for TreeNode (.NET), they do almost the exact same thing... BUT! The .NET TreeNode does a scrollbar update if the TreeView is scrollable.
Try setting Scrollable to false, when you call BeginUpdate; and to true when you call EndUpdate.
James
Simplicity Rules!
|
|
|
|
|
A couple of suggestions:
1) If you want to do a file system like thing, it usually works much better if you populate the tree on demand. I did something like for my book; if you find "A programmer's Introduction to C#" on the Apress website, you can download the source code.
2) It's a lot easier, and usually much more efficient to derive your own class from TreeNode and use that rather than using the string operations. Each time you call Add, it has to create a new TreeNode object and put the string into it, where if you have your own object already, it can be added directly. I do that in my code as well.
|
|
|
|
|
Thanks,
I'll probably have to go more fore the second suggestion because for the type of project I want to do, on demand is not a solution, I don't think I can do it another way, if you would know let me know please.
I want to display the size of the folder with the name of the folder to get the size a folder you need the size of each folder inside the folder so on and so on it's a recursive thing... so why not populate the tree in the mean time but we still want the user to have control of the application, move it, size it, minimize it, stop it, browse the folders that were loaded up to now, etc.
The main idea is:
LoadFolder( foldername )
{
int totalsize
add node
totalsize += size of files in foldername
for each sub folders in foldername
{
totalsize += LoadFolder( subfolder )
update new node text with totalsize
need to process messages here
}
return totalsize
}
then you just need to call LoadFolder( "c:\" ) on you button once If you look at this software it does exactly what I want to do...
www.jamsoft.net/treesize.html
|
|
|
|
|
I don't think I was very clear here. There are really two tasks:
1) Scanning the filesystem to figure out the size of each dir (which my app does).
2) Showing that information in the treeview.
The app requires #1, but it doesn't require putting all that information into the treeview at once. This can take quite a bit of time to do.
|
|
|
|
|
Is there a reason that the set of the TreeNode.Text property triggers the entire control to redraw/erase.
The SetItemText in MFC of the CTreeView does not trigger the entire control redraw/erase so there must be something extra in the set of the TreeNode.Text that make the control do that.
|
|
|
|
|
I don't know the answer to that, and it does seem to be a bug to me.
|
|
|
|
|
I'm not sure that I am correct, but I think you are actually resetting the what is shown on the screen with your line of:
NewNode.Text = "Node: " + i.ToString();
Thus it is having to rewrite over the same information. If you don't make the call to Application.DoEvents(); I think you will see that your screen does not flutter. Is there a reason that you are trying to process all the messages in the message queue here? Something like this should work fine.
TreeNode NewNode;
for( int i = 0; i < 1000; i++ )
{
NewNode = treeView.Nodes.Add( "Node: " + i.ToString() );
NewNode.Text = "Node: " + i.ToString();
}
HTH
Nick Parker
|
|
|
|
|
In MFC/Win32 when I change the text of a node it doesn't trigger the entire redraw of the the tree control I was just expecting the control to act the same way.
I'm mean I should be able to change the text of a node in a loop for more than one reason, progress, size increasing, etc.
If you look at the following link you'll see an application that uses that methode with processing messages or a thread but it his still updating the treeview wile giving control of the application to the user.
www.jamsoft.net/treesize.html
This example is in MFC (sorry to post this is a c# forum) and it changes the text of a node after it was added and it does not cause the entire control to redaw.
HTREEITEM NewNode;
CString strText;
for( int i = 0; i < 1000; i++ )
{
strText.Format( "Node: %d", i );
NewNode = m_TreeView.InsertItem( strText );
m_TreeView.SetItemText( NewNode, strText );
ProcessMessages();
}
|
|
|
|
|
Found the problem
As I speculated it is the Scrollable property that is causing the problem
TreeNode NewNode;
treeView.Scrollable = false;
treeView.BeginUpdate();
for( int i = 0; i < 1000; i++ )
{
NewNode = treeView.Nodes.Add( "Node: " + i.ToString() );
NewNode.Text = "Node: " + i.ToString();
Application.DoEvents();
}
treeView.Scrollable = true;
treeView.EndUpdate(); Regards,
James
Simplicity Rules!
|
|
|
|
|
Hello All,
I'm getting a value from a registry key that is of type REG_MULTI_SZ and I can't display it on the screen. Consider the following:
Console.WriteLine(_remoteRegKey.GetValue("Foobar").ToString());
This is the output I'm getting:
System.String[]
Can anyone enlighten me as to how I can get the value of the key ? Thanks in advance...
-Koby
|
|
|
|
|
It passes back an array of strings. Try, iterating it and displaying them individually...
|
|
|
|
|
Not sure that this will work, but something like this might.
for(int i = 0; i < _remoteRegKey.GetValue("Foobar").Count; i++)
{
Console.WriteLine(_remoteRegKey.GetValue("Foobar")[i].ToString());
}
Someone please correct me if I am wrong. James, I know you are lurking out there.
Nick Parker
|
|
|
|
|
I think you'll need to use this code since GetValue() returns an object;
string [] values = (string []) _remoteRegKey.GetValue("Foobar");
for(int i = 0; i < values.Length; i++)
{
Console.WriteLine(values[i]);
} James
Simplicity Rules!
|
|
|
|
|
Thanks James, I had been up for countless hours last night due to those damn finals. That is all over now, so you don't have to worry about me posting incorrect information now. Sorry for any of those that I mislead.
Nick Parker
|
|
|
|