473,396 Members | 1,891 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,396 software developers and data experts.

questions


1. what are virutal functions and how are they differenet from overloaded
function?

2. what are interfaces and how are they different from abstract classes?

Nov 17 '05 #1
10 1537
Britney,

Virtual functions are the base of overloaded functions. The method on
the base class that can be overridden is virtual, indicating that any class
deriving from that class can override the function.

Interfaces are different from abstract classes because they can not have
implementations (method bodies, fields, etc, etc), where abstract classes
can.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Britney" <br**************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...

1. what are virutal functions and how are they differenet from overloaded
function?

2. what are interfaces and how are they different from abstract classes?

Nov 17 '05 #2
Britney,

Virtual functions are the base of overloaded functions. The method on
the base class that can be overridden is virtual, indicating that any class
deriving from that class can override the function.

Interfaces are different from abstract classes because they can not have
implementations (method bodies, fields, etc, etc), where abstract classes
can.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Britney" <br**************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...

1. what are virutal functions and how are they differenet from overloaded
function?

2. what are interfaces and how are they different from abstract classes?

Nov 17 '05 #3
Hi Nicholas,
I thought when class is Abstract, you can override base class
(changing the implementation)
I'm confused between OVERRIDE and OVERLOAD now.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OE*************@tk2msftngp13.phx.gbl...
Britney,

Virtual functions are the base of overloaded functions. The method on
the base class that can be overridden is virtual, indicating that any
class deriving from that class can override the function.

Interfaces are different from abstract classes because they can not
have implementations (method bodies, fields, etc, etc), where abstract
classes can.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Britney" <br**************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...

1. what are virutal functions and how are they differenet from overloaded
function?

2. what are interfaces and how are they different from abstract classes?


Nov 17 '05 #4
Hi Nicholas,
I thought when class is Abstract, you can override base class
(changing the implementation)
I'm confused between OVERRIDE and OVERLOAD now.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OE*************@tk2msftngp13.phx.gbl...
Britney,

Virtual functions are the base of overloaded functions. The method on
the base class that can be overridden is virtual, indicating that any
class deriving from that class can override the function.

Interfaces are different from abstract classes because they can not
have implementations (method bodies, fields, etc, etc), where abstract
classes can.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Britney" <br**************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...

1. what are virutal functions and how are they differenet from overloaded
function?

2. what are interfaces and how are they different from abstract classes?


Nov 17 '05 #5
Britney,

When a class is abstract, you can override the base class (that base
class being the abstract class).

When you overload a method, you are providing multiple methods with the
same name, but different signatures. When you override a method, you are
providing an implementation that the base class will use when it is called.

For example, this is overloading:

public void DoSomething()
{
DoSomething(0);
}

public void DoSomething(int val)
{
Console.WriteLine(val);
}

You are providing the same method with two different signatures. When
you override, you have something like this:

public class Base
{
public virtual void DoSomething()
{
Console.WriteLine("Called DoSomething from Base.");
}
}

public class Derived : Base
{
public overrides void DoSomething()
{
Console.WriteLine("Called DoSomething from Derived.");
}
}

Base b = new Derived();
b.DoSomething();

When you run the above two lines, DoSomething will print out "Called
DoSomething from Derived.".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Britney" <br**************@yahoo.com> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
Hi Nicholas,
I thought when class is Abstract, you can override base class
(changing the implementation)
I'm confused between OVERRIDE and OVERLOAD now.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OE*************@tk2msftngp13.phx.gbl...
Britney,

Virtual functions are the base of overloaded functions. The method on
the base class that can be overridden is virtual, indicating that any
class deriving from that class can override the function.

Interfaces are different from abstract classes because they can not
have implementations (method bodies, fields, etc, etc), where abstract
classes can.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Britney" <br**************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...

1. what are virutal functions and how are they differenet from
overloaded function?

2. what are interfaces and how are they different from abstract classes?



Nov 17 '05 #6
Britney,

When a class is abstract, you can override the base class (that base
class being the abstract class).

When you overload a method, you are providing multiple methods with the
same name, but different signatures. When you override a method, you are
providing an implementation that the base class will use when it is called.

For example, this is overloading:

public void DoSomething()
{
DoSomething(0);
}

public void DoSomething(int val)
{
Console.WriteLine(val);
}

You are providing the same method with two different signatures. When
you override, you have something like this:

public class Base
{
public virtual void DoSomething()
{
Console.WriteLine("Called DoSomething from Base.");
}
}

public class Derived : Base
{
public overrides void DoSomething()
{
Console.WriteLine("Called DoSomething from Derived.");
}
}

Base b = new Derived();
b.DoSomething();

When you run the above two lines, DoSomething will print out "Called
DoSomething from Derived.".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Britney" <br**************@yahoo.com> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
Hi Nicholas,
I thought when class is Abstract, you can override base class
(changing the implementation)
I'm confused between OVERRIDE and OVERLOAD now.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OE*************@tk2msftngp13.phx.gbl...
Britney,

Virtual functions are the base of overloaded functions. The method on
the base class that can be overridden is virtual, indicating that any
class deriving from that class can override the function.

Interfaces are different from abstract classes because they can not
have implementations (method bodies, fields, etc, etc), where abstract
classes can.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Britney" <br**************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...

1. what are virutal functions and how are they differenet from
overloaded function?

2. what are interfaces and how are they different from abstract classes?



Nov 17 '05 #7
thanks...

One more question,

what is difference between xml serialization and SOAP serialization?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OB**************@TK2MSFTNGP12.phx.gbl...
Britney,

When a class is abstract, you can override the base class (that base
class being the abstract class).

When you overload a method, you are providing multiple methods with the
same name, but different signatures. When you override a method, you are
providing an implementation that the base class will use when it is
called.

For example, this is overloading:

public void DoSomething()
{
DoSomething(0);
}

public void DoSomething(int val)
{
Console.WriteLine(val);
}

You are providing the same method with two different signatures. When
you override, you have something like this:

public class Base
{
public virtual void DoSomething()
{
Console.WriteLine("Called DoSomething from Base.");
}
}

public class Derived : Base
{
public overrides void DoSomething()
{
Console.WriteLine("Called DoSomething from Derived.");
}
}

Base b = new Derived();
b.DoSomething();

When you run the above two lines, DoSomething will print out "Called
DoSomething from Derived.".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Britney" <br**************@yahoo.com> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
Hi Nicholas,
I thought when class is Abstract, you can override base class
(changing the implementation)
I'm confused between OVERRIDE and OVERLOAD now.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OE*************@tk2msftngp13.phx.gbl...
Britney,

Virtual functions are the base of overloaded functions. The method
on the base class that can be overridden is virtual, indicating that any
class deriving from that class can override the function.

Interfaces are different from abstract classes because they can not
have implementations (method bodies, fields, etc, etc), where abstract
classes can.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Britney" <br**************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...

1. what are virutal functions and how are they differenet from
overloaded function?

2. what are interfaces and how are they different from abstract
classes?




Nov 17 '05 #8
thanks...

One more question,

what is difference between xml serialization and SOAP serialization?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:OB**************@TK2MSFTNGP12.phx.gbl...
Britney,

When a class is abstract, you can override the base class (that base
class being the abstract class).

When you overload a method, you are providing multiple methods with the
same name, but different signatures. When you override a method, you are
providing an implementation that the base class will use when it is
called.

For example, this is overloading:

public void DoSomething()
{
DoSomething(0);
}

public void DoSomething(int val)
{
Console.WriteLine(val);
}

You are providing the same method with two different signatures. When
you override, you have something like this:

public class Base
{
public virtual void DoSomething()
{
Console.WriteLine("Called DoSomething from Base.");
}
}

public class Derived : Base
{
public overrides void DoSomething()
{
Console.WriteLine("Called DoSomething from Derived.");
}
}

Base b = new Derived();
b.DoSomething();

When you run the above two lines, DoSomething will print out "Called
DoSomething from Derived.".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Britney" <br**************@yahoo.com> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
Hi Nicholas,
I thought when class is Abstract, you can override base class
(changing the implementation)
I'm confused between OVERRIDE and OVERLOAD now.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OE*************@tk2msftngp13.phx.gbl...
Britney,

Virtual functions are the base of overloaded functions. The method
on the base class that can be overridden is virtual, indicating that any
class deriving from that class can override the function.

Interfaces are different from abstract classes because they can not
have implementations (method bodies, fields, etc, etc), where abstract
classes can.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Britney" <br**************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...

1. what are virutal functions and how are they differenet from
overloaded function?

2. what are interfaces and how are they different from abstract
classes?




Nov 17 '05 #9
Britney,

XML serialization will serialize an instance into XML, but it will only
serialize the public fields/properties in the objects exposed in the object
graph.

SOAP serialization is a complete serialization of the object instance's
private fields (and all the private fields of references maintained by the
object). It's a much more accurate representation of the object, but not
very human-readable.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Britney" <br**************@yahoo.com> wrote in message
news:Oi**************@TK2MSFTNGP09.phx.gbl...
thanks...

One more question,

what is difference between xml serialization and SOAP serialization?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OB**************@TK2MSFTNGP12.phx.gbl...
Britney,

When a class is abstract, you can override the base class (that base
class being the abstract class).

When you overload a method, you are providing multiple methods with
the same name, but different signatures. When you override a method, you
are providing an implementation that the base class will use when it is
called.

For example, this is overloading:

public void DoSomething()
{
DoSomething(0);
}

public void DoSomething(int val)
{
Console.WriteLine(val);
}

You are providing the same method with two different signatures. When
you override, you have something like this:

public class Base
{
public virtual void DoSomething()
{
Console.WriteLine("Called DoSomething from Base.");
}
}

public class Derived : Base
{
public overrides void DoSomething()
{
Console.WriteLine("Called DoSomething from Derived.");
}
}

Base b = new Derived();
b.DoSomething();

When you run the above two lines, DoSomething will print out "Called
DoSomething from Derived.".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Britney" <br**************@yahoo.com> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
Hi Nicholas,
I thought when class is Abstract, you can override base class
(changing the implementation)
I'm confused between OVERRIDE and OVERLOAD now.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OE*************@tk2msftngp13.phx.gbl...
Britney,

Virtual functions are the base of overloaded functions. The method
on the base class that can be overridden is virtual, indicating that
any class deriving from that class can override the function.

Interfaces are different from abstract classes because they can not
have implementations (method bodies, fields, etc, etc), where abstract
classes can.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Britney" <br**************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
>
> 1. what are virutal functions and how are they differenet from
> overloaded function?
>
> 2. what are interfaces and how are they different from abstract
> classes?
>
>
>



Nov 17 '05 #10
Britney,

XML serialization will serialize an instance into XML, but it will only
serialize the public fields/properties in the objects exposed in the object
graph.

SOAP serialization is a complete serialization of the object instance's
private fields (and all the private fields of references maintained by the
object). It's a much more accurate representation of the object, but not
very human-readable.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Britney" <br**************@yahoo.com> wrote in message
news:Oi**************@TK2MSFTNGP09.phx.gbl...
thanks...

One more question,

what is difference between xml serialization and SOAP serialization?
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OB**************@TK2MSFTNGP12.phx.gbl...
Britney,

When a class is abstract, you can override the base class (that base
class being the abstract class).

When you overload a method, you are providing multiple methods with
the same name, but different signatures. When you override a method, you
are providing an implementation that the base class will use when it is
called.

For example, this is overloading:

public void DoSomething()
{
DoSomething(0);
}

public void DoSomething(int val)
{
Console.WriteLine(val);
}

You are providing the same method with two different signatures. When
you override, you have something like this:

public class Base
{
public virtual void DoSomething()
{
Console.WriteLine("Called DoSomething from Base.");
}
}

public class Derived : Base
{
public overrides void DoSomething()
{
Console.WriteLine("Called DoSomething from Derived.");
}
}

Base b = new Derived();
b.DoSomething();

When you run the above two lines, DoSomething will print out "Called
DoSomething from Derived.".
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Britney" <br**************@yahoo.com> wrote in message
news:O9**************@tk2msftngp13.phx.gbl...
Hi Nicholas,
I thought when class is Abstract, you can override base class
(changing the implementation)
I'm confused between OVERRIDE and OVERLOAD now.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in message news:OE*************@tk2msftngp13.phx.gbl...
Britney,

Virtual functions are the base of overloaded functions. The method
on the base class that can be overridden is virtual, indicating that
any class deriving from that class can override the function.

Interfaces are different from abstract classes because they can not
have implementations (method bodies, fields, etc, etc), where abstract
classes can.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Britney" <br**************@yahoo.com> wrote in message
news:Oj**************@tk2msftngp13.phx.gbl...
>
> 1. what are virutal functions and how are they differenet from
> overloaded function?
>
> 2. what are interfaces and how are they different from abstract
> classes?
>
>
>



Nov 17 '05 #11

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

Similar topics

0
by: softwareengineer2006 | last post by:
All Interview Questions And Answers 10000 Interview Questions And Answers(C,C++,JAVA,DOTNET,Oracle,SAP) I have listed over 10000 interview questions asked in interview/placement test papers for...
0
by: connectrajesh | last post by:
INTERVIEWINFO.NET http://www.interviewinfo.net FREE WEB SITE AND SERVICE FOR JOB SEEKERS /FRESH GRADUATES NO ADVERTISEMENT
2
by: freepdfforjobs | last post by:
Full eBook with 4000 C#, JAVA,.NET and SQL Server Interview questions http://www.questpond.com/SampleInterviewQuestionBook.zip Download the JAVA , .NET and SQL Server interview sheet and rate...
4
by: Drew | last post by:
I posted this to the asp.db group, but it doesn't look like there is much activity on there, also I noticed that there are a bunch of posts on here pertaining to database and asp. Sorry for...
8
by: Krypto | last post by:
Hi, I have used Python for a couple of projects last year and I found it extremely useful. I could write two middle size projects in 2-3 months (part time). Right now I am a bit rusty and trying...
0
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7...
1
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7...
0
by: ramu | last post by:
C# Interview Questions and Answers8 http://allinterviewsbooks.blogspot.com/2008/07/c-interview-questions-and-answers8.html C# Interview Questions and Answers7...
0
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions...
0
by: reema | last post by:
EJB Interview Questions http://interviewdoor.com/technical/EJB-Interview-Questions.htm CSS Interview Questions http://interviewdoor.com/technical/CSS-Interview-Questions.htm C Interview Questions...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.