GeekInterview.com
Answered Questions

Virtual function in c#

Asked By: isaacsundarsingh | Asked On: May 29th, 2008

Explain virtual function in c# with an example

Star Read Best Answer

Editorial / Best Answer

Answered by: bb.geetha

View all answers by bb.geetha

Member Since May-2008 | Answered On : Jun 6th, 2008

Virtual functions implement the concept of polymorphism are the same as in C#, except that you use the override keyword with the virtual function implementaion in the child class. The parent class uses the same virtual keyword. Every class that overrides the virtual method will use the override keyword.

class Shape
{
public virtual void Draw()
{
Console.WriteLine("Shape.Draw") ;
}
}

class Rectangle : Shape

{
public override void Draw()
{
Console.WriteLine("Rectangle.Draw");
}
}


Answered by: md.shahidkamal on: Oct 6th, 2010

What               :           Virtual Function is used to have polymorphic Effe...

Answered by: Elansan on: Mar 4th, 2010

It has override keyword in the child class and the base class containing the virutual keyword.

ASP.Net code behind pages

Asked By: rekharaju | Asked On: May 1st, 2008

When using code behind pages, which library must access file import from ASP.Net environment

Answered by: amitleo81 on: Dec 18th, 2009

ASP.Net uses two ways/techniques of coding pages 1) Inline code2) Code behind 1) In Inline code,code is directly embedded directly within asp.net aspx page.2) In code behind technique we hav...

Answered by: reach_yousuf on: Sep 16th, 2009

Inherits System.Web.UI.Page

Page posting

Asked By: ushalakshmi | Asked On: Apr 18th, 2008

How do you post a current page to different aspx page?

Answered by: Chiri on: Sep 10th, 2010

Responce.Redirect("Newpage.aspx",false);

Answered by: nithincninan on: Dec 8th, 2008

 protected void Page_Load             {             Response.Redirect("webform.aspx&...

How does the cookies work in ASP.Net?

Asked By: cyus_sg | Asked On: Jan 8th, 2008

I want to know the complete follow of the page how it store cookies and user info into session and when it get terminate also is it possible to call in-process application to out-process?

Star Read Best Answer

Editorial / Best Answer

Answered by: Prabhat Chauhan

View all answers by Prabhat Chauhan

Member Since Jul-2008 | Answered On : Jul 23rd, 2008

we know Http is an state-less protocol which is required for interaction between clinet and server .

so there is an need to remeber state of request raised by an web browser so that
web server can recognize you have already previously visited or not.

There are two types of state management techniques:
a) Client side state management
b) Server - side statemanagement

Using cookies comes under clinet side statemanagement .In HttpResponse we write
Cookie containing sessionId and other information within it.

when a browser made a request to the web server the same cookie is sent to the server where server recognize the session id and get other information stored to it previously.

Cons:
1)Cookie should contain non sensitive data as one can easily read cookies and they result of which your security may be tampered .
2) Cookie should not contain large amount of information as they are sent back and forth with request and response in between client and server which may cause your
Performance degradation

Answered by: Prabhat Chauhan on: Jul 23rd, 2008

we know Http is an state-less protocol which is required for interaction between clinet and server .so there is an need to remeber state of request raised by an web browser so that web server can reco...

Answered by: nanda kuma on: Jul 17th, 2008

.NET FRAMEWORK AS 2 COMPONENTS
1. CLR(common language runtime)
2. base class library
- it manages the execution of pgms on cpu
- provides an run time environment  for all the .net applications
- also it provides memory management, garbage collection, security

What is the difference between .Net framework and .Net compact framework?

Asked By: Gopal krishna | Asked On: Jan 3rd, 2007

Star Read Best Answer

Editorial / Best Answer

Answered by: bb.geetha

View all answers by bb.geetha

Member Since May-2008 | Answered On : Jun 12th, 2008

The .NET Compact Framework is a subset of the .NET Framework designed for small-footprint devices. It includes most, but not all of the base class library available in the full framework.

Answered by: samina naaz on: Jun 30th, 2010

The .NET Compact Framework is a subset of the .NET Framework designed for small-footprint devices.

Answered by: ptharak on: Oct 20th, 2008

DataREader is ued for readonly and forward .
Dataset is used to either read and Write

Whenever sequential is read needed then you can go for DtaREader , it gives better performance than DataSEt.

Using DataSEt you can get entire relationship of the tables and schema.

What is partial class

Asked By: hksjadon | Asked On: Sep 26th, 2006

Star Read Best Answer

Editorial / Best Answer

Answered by: bb.geetha

View all answers by bb.geetha

Member Since May-2008 | Answered On : Jun 12th, 2008

A Partial class is a class that can be split into two or more classes. This means that a class can be physically separated into other parts of the class within the same namespace. All the parts must use the partial keyword. All the other classes should also have the same access modifier. At the compile time, all the partial classes will be treated as a single class. Let us list some advantages of having partial classes.

Answered by: lata negi on: Nov 4th, 2011

Partial class is a new feature added to .NET Framework 2.0. .NET 1.0 or 1.1, does not support for partial classes. It is possible to split the definition of a class or a struct, or an interface over t...

Answered by: hellodebasish on: May 22nd, 2009

The class having partial keyword and same name. One class can split into more than two parts having same name and partial keyword. In the time of object creation all partial class group together to ma...

Where query string is stored

Asked By: vishali | Asked On: Aug 18th, 2006

Answered by: jnaneswarisd on: Jun 9th, 2009

A query string is the part of a Uniform Resource Locator (URL) that contains data to be passed to web applications.

Answered by: bb.geetha on: Jun 12th, 2008

query string is not stored somewhere it is visible in user browser.

What is the difference between excute query and excute nonquery.?

Asked By: Interview Candidate | Asked On: Jul 22nd, 2005

Answered by: sheetal maheshwari on: Nov 24th, 2011

: execute query is used for DDL commands whereas execute nonquery for DML.

Answered by: Vimlesh Kumar on: Sep 8th, 2011

In ADO.net for Command Object you have 3 methods
1.ExecuteReader - Select statements
2.ExecuteNonQuery - DML statements(Insert,Update and Delete) - Returns Number of rows affected
3.ExecuteScalar - Returns a single value from Aggregate functions like SUM,AVG,COUNT etc

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us: