Looking for C# and .net Resources

I am looking for some good (advanced) resources on C# and .net. Please note I did a search, but were not able to locate too many threads about this, and the threads I found was mainly about simple resources.

I have been programming in PHP for over a decade, but due to a change of events I need to switch and complete one of our .net windows applications (C#). I guess I should mention that I am familiar with OOP and I have no problems with reading/understanding C# code.

The main thing that is confusing for me is the “Design View”, its something Im not used with from programming in PHP. So I would be very grateful if someone know about some good tutorials or books about this part of Visual Studio.

Other than that, if someone has a link to a more advanced resource on C#/.net (or a book for that matter), it would be nice.

Note, Im using Visual Studio 2008.

Thanks

The main thing that is confusing for me is the “Design View”, its something Im not used with from programming in PHP. So I would be very grateful if someone know about some good tutorials or books about this part of Visual Studio.

It’s simple, DON’T use it :D. I’m assuming it’s a web application, web forms or asp.net mvc it doesn’t matter, the design view is only for people who use the design view in Dreamweaver too. You can even deactivate it (at least in VS 2010).

About advanced resources, I really don’t know what you need. Perhaps you can tell us more details about the application (technology, needs etc) .

Thanks for your reply praetor!

The application is not a web application Im afraid, so the design view is required to create the GUI (as far as I know?).

Briefly said, the application is a “intelligent” spider, in the meaning that you will create different regex’es that relate to each other and which in the end decide if it should capture any information, or if it should follow a sub link.

Currently the application is working, but the goal is to alter it making it more user friendly (Altering the GUI and adding some more functionality to simplify some of the parts).

For the more advanced resources on C#, Im mainly wondering on good approaches to take on memory management and stuff like that. The application is using threading and I was able to find a few good articles on that subject, but not that much on actual memory management. Though this is perhaps not that big of an issue in C# as in php? Since the application load once, instead of on each request.

Thanks

The design view isn’t required but it saves the time. Instead of creating in code the objects, setting properties etc you just drag’n’drop them and set properties there.

About memory management, the .Net framework takes care of it. The only thing you should remember is to dispose any object implementing IDisposable (usually these are: database connections, files, streams, graphic resources, timers etc). This video is also a very good resource on the matter.

Since the application load once, instead of on each request.

Tip: A .net web application (the application domain to be exact) is also loaded just once :slight_smile: but it handles requests via HttpApplications threads.

Yeah, I also recommend the Andrew book. I have the Pro .NET 4.0 on my bookshelf, and is the one I turn to the most. Great book especially if you make apps for different mediums, desktop, RIA, and web. Of course, you will need a more feature focused book to go along with the “overview”.

You could try this http://www.apress.com/book/view/1590598849

I recommend this book - http://www.robmiles.com/

http://java2s.com for some code examples

Thanks for the recommendations on the books and the links.

Do anyone have a recommendation on a good TDD library for C#?

NUnit is probably the best option – it is very mature at this point and has great tooling support.

There is a builtin unit testing framework in visual studio (MSTest) that has some downsides but is not bad for learning as it has great IDE support. Then again, you can get to the same place with the TestDriven.NET plugin and not have a sucky unit testing framework to deal with.

Other decent options include Gallio/MBUnit and XUnit.

Like he said.

I find myself more comfortable using XUnit these days, perhaps because XUnit tries to simplify things. Anyway if you’re using something like Resharper there is built in support for NUnit, but there is a project which adds support for xunit too.

I haven’t found a good reason why I should drop NUnit for XUnit – you can get to alot of the same places and you still have all the other crazy stuff they have baked into NUnit over the years. The other big reason is tooling – everything works with NUnit, generally out of the box with point and click configuration. XUnit at least requires other tools.