3
Answers

New to programming, where do I start to learn C# ASP.NET?

Photo of dan hickson

dan hickson

12y
3k
1
Hi, I am totally new to programming other than simple visual basic in MS access. I am currently working as an IT Technician but I will be required to take over our web devlopers duties in a year or so.

The only qualifications I have are in the IT Techs field.

He is using MS Visual 2010 and writes in C#.

My question is, where do I even begin to start and understand this?
I have searched online and its overwhealming. I just need a starting point really.

Do most people start with beginner books> will this book be good to start withhttp://www.amazon.co.uk/Beginning-ASP-NET-In-Wrox-Programmer/dp/0470502215/ref=sr_1_1?ie=UTF8&qid=1344349738&sr=8-1


Appreciate any advice.


Thanks

Answers (3)

2
Photo of Roy S
NA 1.1k 0 12y
I haven't found a situation yet where an interface is used, so I can't help you with that.

But I have used an abstract class before and the way I see it, it's used to group a few common properties/methods together.

Say you're making a chess program and you're using 6 classes to represent the different chesspieces (pawn, rook, ..., king). These pieces are different from eachother in terms that they move different and some other differences, but they also have a lot in common. Like the location, if they moved already, color.

In this case it would be good if all the classes could inherit from another class containing those common properties. But creating a normal ChessPiece class would be weird in this case because it doesn't make sense that you can instantiate this class. The solution is to use a abstract class.

public abstract class Chesspiece
{
    Point Location {get; set; }
    bool HasMoved {get; set; }
    Color Owner {get; set; }
}

public class Pawn : ChessPiece
{
    //rest of class here
}

public class Rook : ChessPiece
{
    //rest of class here
}

//rest of classes here
1
Photo of Sibeesh Venu
NA 42.7k 5.1m 10y

An interface contains only the signatures of methods, delegates or events. The implementation of the methods is done in the class that implements the interface.
when you implemnt interface You are very much sure ,that the method in the interface is implemented in the class.
 
You can say Interface is a class which contain all unimplemented methods taht are implemented in Class that implement it.
 
Use:
 
Suppose you have a project with lot of classes and each class have no. of methods.
So , How you know which class implement perticuler methods.We make interface for each/some classes and implement these interfaces in that class.
1
Photo of Mahesh Chand
2 286.9k 123.8m 12y
As Roy said, its very rate you will be using interfaces and abstract classes unless you're the architect of a project that needs complex architecture. In typical small Windows and Web applications, you probably don't need them.
0
Photo of Sai Sherlekar
NA 970 144k 12y
Contract means u r making rules which is compulsory to everywhere in ur project.
consider u r working on project where u need to add, edit, save in customer, invoice, cards etc.
so u can create interface with declaration of all add, edit ,save methods.

inherit interface in everywhere in ur project where u need to add, edit, save.

so u r strictly using same named method for add, edit, save in everywhere.

means u have created contract which should be follow everywhere to add, edit, save.

u can inherit more than one interface that is also major advantage.