I need to start learning C#, does anyone have a good book that they would recommend. Possibly something I could walk into Barnes & Noble and grab.
Printable View
I need to start learning C#, does anyone have a good book that they would recommend. Possibly something I could walk into Barnes & Noble and grab.
Try C Sharp How to Program by Deitel & Deitel. It's been pretty long since I've read this book, but it was my starter book with C Sharp.
I appreciate the recommend, going to pick that book up today.
i got an electronic copy.
Jennifer, if possible, I would appreciate receiving an electric copy of it.
I went to Fry's Electronics and Borders yesterday, but could not find that book, so I went with the one below:
Sams Microsoft Visual C# 2005 Unleashed by Kevin Hoffman.
Also, can somebody give me a very good real world example that can help me understand the difference between a Class and an Interface? I have never really understood that, but we never really used alot of that where I work.
Check this link:
<removed by moderator>
It's a pretty old book, but one that i find useful nonetheless.
An interface is very similar to a class however it contains definitions rather than implementations. Within an interface, methods and variables could be declared but not instantiated, thus an interface cannot be instantiated as an object like a class. it's very similar to an abstract method.
Interfaces could be used to properly structure one's program by using inheritance and polymorphism. Using inheritance, a class could inherit from an interface.
A good example, I don't know if this is good, but I did this a few years ago.
The following is basic pseudocode:
Code:public interface Shape
{
int calculatearea();
int calculateperimeter();
}
public class Rectangle:Shape
{
int x, y;
// constructor goes here
public int calculatearea()
{
// code to actually calcualte the area of a rectangle.
return result;
}
public int calculateperimiter()
{
// code to actually calcualte the perimiter of a rectangle.
return result;
}
}
public class Square:Shape
{
int x;
// constructor goes here
public int calculatearea()
{
// code to actually calcualte the area of a square.
return result;
}
public int calculateperimiter()
{
// code to actually calcualte the perimiter of a square.
return result;
}
}
// the following could be within the user method :
Shape Rect = new Rectangle(4, 9);
Shape Squ = new Square(5);
to access the area of Rect with widtha nd height of 4, 9:
Rect.calculatearea();
to access the area of square with length of 5:
Squ.calculatearea();
Note that the interface only contains declaratoins and not the actual implementation code of the methods. When using an interface, for e.g. the above Shape, you must define ALL the methods in the interface or else an error will be thrown. And if we were to consider additional shapes such as circle, cylinder, oval etc, its easier to include classes for these additional shapes by inheriting from our Shape class.
Try research on MSDN on oop...
Yeah, deitel is a good book...I've used their vb6.0 and vb.net...now im migrating to c#...
For database or asp.net, I recommend SAMS or Sybex series...
However, there are lots of good books out there...It just depends on how you adapt to their writing style...
Greg
Greg
I don't think you should have those links up, as far as i know electronic books state that only the purchaser can use the book. Anyhow, if your looking for up to date books www.apress.com has a good selection in ebook form, they also offer a discount because you are not buying a hard copy.
Those links to the e-books should not be there as it goes against the forum's AUP to illegally share such material. In case you see this post first, Jennifer, please remove the links. In any case, I have reported your posts.
Jennifer, thanks for the Code Breakdown.
I am a bit torn on what to learn, C# in general or ASP.Net 2.0 with VB.Net.
The learning curve for ASP.Net with VB.Net is lower because I know 1.1 and VB.Net, but it seems like most people are using C#.
Thanks for the advice on books, I have alot of reading and coding to do.
If VB.NET is easier for you, then learn that. Then you can start learning C# as it simply becomes a syntax difference with some minor language specific attributes that you need to learn.
Yeah, even though I bought the C# book, I am going to take your advice and just learn ASP.Net 2.0 with VB.Net. The ASP.Net 2.0 book I bought teaches VB.Net and C#, so that should help.Quote:
Originally Posted by mendhak
Hopefully there aren't a whole lot of changes from 1.1 to 2.0.
My apologies.Quote:
Originally Posted by mendhak
There are a few changes in areas that you'd appreciate if you had been using ASP.NET 1.1 for a long time. Since you're picking up ASP.NET 2.0, you get the best of what has been missing from ASP.NET 1.1.Quote:
Originally Posted by maikeru-sama
Yes, there are huge differences.Quote:
Originally Posted by mendhak
I don't think I want to know what the differences are between 2003 and 2008 is :sick: .