ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories >> Software >> Microsoft-Related
 
  Visual-Basic (584)  C-Sharp (457)  ASP.NET (949)  VB.NET (89)  COM+ (37)
  ADO.NET (151)  IIS (61)  MTS (2)  Crystal-Reports (41)  BizTalk (14)
  Exchange-Server (61)  Microsoft-Related-AllOther (26)
 


 

Back to Questions Page
 
Question
what is a delegate? what it is used for?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions
I also faced this Question!!   © ALL Interview .com
Answer
Delegates are reference types which allow indirect calls to 
methods .some single delegates can reference multiple 
methods
 
4
Bijeshs
 
 
Answer
Delegate is a Function Pointer.It invokes methods. 
References to methods are wrapped in delegates.
 
5
Asin
 
 
Answer
Delegates are similar to function pointers in C C++,
Delegate objects hold references to functions.

Delgates are mainly used in  event handling
 
3
Divya
 
 
 
Answer
Delegate is nothing but a Function pointer,which stores the 
address of a method.
These of two types
1)simple delegate:which stores the address of the method.
2)multi cast delegate: which stored the address of multiple 
methods.

Generally Delegates are used for EVENT HANDLING and GENERIC 
ROUTINES
 
0
Ranjith
 
 
Answer
Delegate defines a reference type that can be used to 
encapsulate a method.Delegate is a function pointer in c++.

I. Delegate is  a Type-Safe and secure
 
0
Anu1983_mca@yahoo.co.in
 
 
Question
what is a dataview?why is it used for?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions
I also faced this Question!!   © ALL Interview .com
Answer
DataView is Replica of a DataTable,which will be used for 
sorting,Filtering,searching and editing.
 
1
Anantha
 
 
Answer
A DataView provides a dynamic view of data whose content, 
ordering, and membership reflect changes to the underlying 
DataTable as they occur.
 
1
Anu
 
 
Answer
Represents a databindable, customized view of a DataTable 
for sorting, filtering, searching, editing, and navigation. 
Namespace: System.Data
Assembly: System.Data (in system.data.dll)
 
0
Ravikumar
 
 
Question
How do you filter the data in datagrid?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions , ApsLab, Choice--solutions
I also faced this Question!!   © ALL Interview .com
Answer
RowFilter is a read/write property that gets and sets the 
expression used to filter the table.

Eg: DataView dv = dt.DefaultView;
    dv.RowFilter = "Country = 'USA'";
 
0
Sunil
 
 
Question
How do you sort the data in datagrid?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions
I also faced this Question!!   © ALL Interview .com
Answer
Protected Sub Sorting(ByVal sender As Object, ByVal e As 
GridViewSortEventArgs)
        Dim DESCENDING As String = "DESC"
        Dim ASCENDING As String = "ASC"

        Dim sortExpression As String = e.SortExpression
        If GridViewSortDirection = SortDirection.Ascending 
Then
            GridViewSortDirection = SortDirection.Descending
            SortGridView(sortExpression, DESCENDING)
        Else
            GridViewSortDirection = SortDirection.Ascending
            SortGridView(sortExpression, ASCENDING)
        End If
    End Sub
(Call this onsorting in datagrdi)
2)
Public Property GridViewSortDirection() As SortDirection
        Get
            If ViewState("sortDirection") Is Nothing Then
                ViewState("sortDirection") = 
SortDirection.Ascending
            End If
            Return CType(ViewState("sortDirection"), 
SortDirection)
        End Get
        Set(ByVal value As SortDirection)
            ViewState("sortDirection") = value
        End Set
    End Property
3) Private Sub SortGridView(ByVal sortExpression As String, 
ByVal direction As String)
        Try
            Dim dt As DataTable = BindData().Tables(0)
            Dim dv As New DataView(dt)
            dv.Sort = sortExpression + " " + direction
            gdvCamp.DataSource = dv
            gdvCamp.PageIndex = 0
            gdvCamp.DataBind()

        Catch ex As Exception
            Response.Write(ex.Message)
        End Try

    End Sub 'SortGridView 

  Bing the data like fallows
 Private Function BindData() As DataSet
   Binding Goes here which should returns dataset to above 
function
End FUnction
 
0
Shiva
 
 
Answer
In a simple method,

DataSet ds = new DataSet();
// you must populate the dataset
DataTable dt = ds.tables[0];
DataView dv  = new DataView(dt);
dv.Sort = dt.Columns[0];
// This will sort first column in ascending
dv.Sort = dt.Columns[0] + " DESC";
// This will sort first column in descending
 
0
Sunil
 
 
Answer
By setting "allow sorting" property of the datagrid to 
true we can sort the records in the data grid
 
0
Murty
 
 
Question
what are the differences between dataset and datareader?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions
I also faced this Question!!   © ALL Interview .com
Answer
DataSet : you can move forward\backward of the data.It can 
be Edited.It acts as a database after the connection is 
closed.

Reader :  It Just moves forward only.And cannot edit it is 
only for Read Only purpose.For this connection object will 
be there till u read all the values.
 
0
Anu
 
 
Answer
dataset is a disconnected architecture while a datareader 
is a connected architecture object. 

data reader is a faster than a dataset
 
0
Hardik
 
 
Question
what is a dataset?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions
I also faced this Question!!   © ALL Interview .com
Answer
1)Dataset works like a frontend database.
2)Dataset supports disconnected architecture.
3)Dataset is a class.
4)It is the collection of tables.
5)Hence dataadapter means it is interface between dataset 
and database.
6)Dataset is a bridge.
7)Dataset is constraint like(primary key,foreign 
key,relation).
 
0
Sameer Kumar Das
 
 
Answer
Data set is Disconnected Architecture. This is place to 
store data that we retrive from data base(using Data 
Adapter). After Retrive data from data base we no need to 
maintain a connection with data base
 
0
Rajender
 
 
Answer
Dataset is an Ado.Net object.It is an Inmemory 
representation of a database i.e it provides disconnected 
environment using DataAdapter.
 
0
M.mohan Krishna
 
 
Answer
Dataset is a fundamental object of ado.net.It provides a 
basis of manipulating relational data in disconnected mode.
 
0
Asfaq
 
 
Answer
Data set is passive contener of data.Dataset is an Ado.Net 
object.It is an Inmemory representation of a database .
Data set is fill by dataadapter using Fill method.
 data set work in disconnected mode.
 
0
Rahul Ecimt
 
 
Question
How do you remove the objects which are not in
use?Explicitly or implicitly?What is the exact mechanism
going behind?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions , Advanced Software Systems
I also faced this Question!!   © ALL Interview .com
Answer
Dispose method()
 
2
Venkat
 
 
Answer
Garbage collectors removes
 
0
Raghu Sathish
 
 
Question
Does c# supports destructors?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions
I also faced this Question!!   © ALL Interview .com
Answer
Yes

Example: 
class A
{
A(){} //Constructor.
~A(){} //Distructor.
.........
..........
}
 
0
K. Amith Kumar
 
 
Answer
i think it doesnt allow to use Destructor.

there is a method called Dispose() which automatically 
calls destructor
 
0
Ashish Gupta
 
 
Answer
yes,C# allows destructor.
 
0
'tiger' Senthil
 
 
Answer
yes.

when a objects created by Constructor are removed by 
destructor
 
0
Vijay
 
 
Answer
Yes and No,
C# supports destructors just to provide a familiar way fo 
destructing objects for C++ developers. even syntax also is 
same but internally its the dicpose method that does all 
the work. 

Even if you declare a destructor the compiler automatically 
translates a destructor into an override of the 
Object.Finalize() method. In other words, the compiler 
translates the following destructor:  

class Class1
{
~Class1(){}
}

Into the following code:

class Class1
{
Protected override void Finalize()
{
try{..}
finally { base.Finalize();}
}
}

I guess that makes things more clear.
 
0
Praveen Saxena
 
 
Answer
No, I didnt think distructor is supported by C# as far as 
dispose() is concern it is used for clean up code like 
finalize the object is distroyed automatically by garbage 
collector
 
0
Mahesh
 
 
Answer
Desturctors are very much supported by c#. Internally a c# 
destructor is converted to a finalize method call.
 
0
Puneet
 
 
Answer
yes c# allow destructures
 
0
Kamlesh Sharma
 
 
Question
what is a constructor?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions
I also faced this Question!!   © ALL Interview .com
Answer
Constructor is a method that is executed when an object is
created.
 
5
Divya
 
 
Answer
Constructor is a method which will be executed when an 
object is created. It is used to Intialize the 
object.constructors has the same name as the class 
name.constructors will take parameters.constructors doesnot 
return any value
 
4
Ranjith
 
 
Question
why instance? what are the uses of instance?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions
I also faced this Question!!   © ALL Interview .com
Answer
The object of a class is called as Instance & the process is
called as Instantiation.

To access or to call a member of a class we need instance.

eg.

public class myClass
{
  public myClass()
  {
  }
  
  public string show()
  {
   return "Hello India!";
  }
}

To access method show(), we need instance of the class
myClass. And the code will be as:-
myClass obj_mc = new myClass()
string str=obj_mc.show();

Now str contains string value 'Hello India!'

Hope u have got the point.
 
0
Navin C. Pandit
 
 
Answer
instace is the way to access members(methods) in that
class,by this instance to invoke the methods.
 
0
Yathirajulu
 
 
Question
what are the advantages of c# over vb.net?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions
I also faced this Question!!   © ALL Interview .com
Answer
C# Supports memory pointer where as VB.net dont

C# is Suitable for C,C++ Programmer

casting object type is easy in C# (object)

in vb.net Ctype(blah blah blah)
 
2
Bond
 
 
Answer
c#.net is more secure when compare to vb.net


if any dout plz mail me
 
1
Ssr
 
 
Answer
C# supports two things which is not supported by VB.NET
1. Operator Overloading
2. Pointer
 
4
Nikhil
 
 
Answer
c# is case sencitive,vb.net is not case sencitive,c# 
statements is placed between braces but in vb,net in 
between end of itself(sub  .. end sub).

thank you.
 
0
Chandra
 
 
Question
what is the difference between interface and abstraction?
Rank Answer Posted By  
 Question Submitted By :: Swapna
This Interview Question Asked @   Choice-Solutions
I also faced this Question!!   © ALL Interview .com
Answer
1) In Interface we can give only declarations not 
definitions but in abstraction we can hv definitions also.
2) In an Abstraction we must hv at least one abstract  
function.
3) Abstraction can not be instantiate .
4) In Interfaces we can not assign access identifier.
5) A class can implement 2 interfaces but can inherit only 
one Abstract function.
 
5
Ashish Gupta
 
 
Answer
interface:
 in interface,all methods must b abstract,by default all
members are PUBLIC,cant b implimented infact derived class
impliments its methods
interface can use multiple interface
abstract:
it is just like interface,not imolimented by itself,only
derived class can impliment abstract class or abstract
methods,abstract methods can b private unlike interface,cant
allow multiple inheritance
 
0
Sajid
 
 
Answer
In Interface, all the member functions are abstract implicitly  
so it is imp. to define all fn. declared inside Interface.
Moreover, we cann't define a fn. or we cann't  declare any
member variable in an Interface. Also, we cann't declare or
define any non-abstract method in Interface.

In Abstract class, we can declare an abstract method as well
as we can also define a  non-abstract method. We can also
declare a variable member in abstract class.

In both the condition, declared abstract method is
implemented  out side the class i.e in derived class which
inherits Interface/Abstract class, whatever you have used.
 
0
Navin C. Pandit
 
 
Question
Can an Assembly have multiple versions
Rank Answer Posted By  
 Question Submitted By :: Krishna
This Interview Question Asked @   TCS
I also faced this Question!!   © ALL Interview .com
Answer
Yes
 
0
Krishna
 
 
Answer
no
 
0
Praveen
 
 
Answer
yes
 
0
Xyz
 
 
Answer
YES
 
0
Sudhir
 
 
Answer
yes
 
0
Durgesh
 
 
Answer
Yes
 
0
Diana Cheriyan
 
 
Answer
yes
 
0
Vijaykumar
 
 
Answer
yea
 
0
Vaibhav Patel
 
 
Answer
yes
 
0
Baburaj P V
 
 
Question
Difference between C++ and C#.net
Rank Answer Posted By  
 Question Submitted By :: Krishna
This Interview Question Asked @   TCS , Wipro, Wipro
I also faced this Question!!   © ALL Interview .com
Answer
C# - web programming,CLR..
 
0
Krishna
 
 
Answer
C++ is OOPS based while C# is Component & OOPS Based..
 
0
Raghu Sathish
 
 
Answer
Default access Specifier is Public in c++.
Default access Specifier is Private in c#.net.
 
0
Sivaraman.s
 
 
Answer
c++:
1.  C++ code usually compiles to assembly language.
2. will allow multiple inheritence. eg. allows a method to
be overriden many times in subclasses (derived classes).

C#:
1. C# by contrast compiles to Intermediate language (IL),
which has some similarities to java byte code.
2. supports inheritence, but not multiple, only 1 override
per method/function/
 
0
Suryaprakash
 
 
Answer
C++ is platform independent i.e. it directly compiles the
code into executable file where as C# is platform dependent
bcoz. it compiles the code to intermediate language(IL) &
the IL is the paased to .NET framework which activates CLR.
The CLR converts these IL into executable file.
 
0
Navin C. Pandit
 
 
Answer
Navin, what you told is not correct. C++ is platform 
dependent where as C# not. MSIL code will run in any 
platform if CLR is running.
For e.g., if a CLR is developed for Linux(I think its 
there), the code which got compiled in Windows can be run 
there. 
But for C++, the .exe file created is very much dependent 
on the machine. For e.g., the Windows C++ .exe file can 
never be run in Linux.
 
0
Sharmin Jose
 
 
Answer
c++ follows oops and support for multiple inheritence with 
direct executable file on platform whereas c# is oops and 
component based .net lang.and compiles into assembly
 
0
Vijay
 
 
Answer
c++ was older version while c# is obtained by merging features of c++ and java

 
0
Varun
 
 
Answer
1.c++ supports Object oriented bt c# is purely object 
oriented....2.in c++ the main class is diffrent it is 
outside d class bt in c# the main class in inside d class..
 
0
Aman
 
 
Answer
C++ uses the "include" header files where as c# uses the 
namespaces,
C++ runs for assmebly languages
where as c# runs in .net framework,
Pointers can be used anywhere in c++
but in c# pointers are used only in unsafe mode.
C++ does not support the multiple inheritance,c# support 
mulutiple inheritance.
 
0
Basveshwar
 
 
Question
If we add a textbox and give the required field 
validator,and i add two radio buttons 1 is yes another one 
is No.And i add another one server control button ,if i 
click the button ,if the radio button Yes is checked the 
validation control is fired ,if no the validation control 
is not fired.So what you used to solve this problem.
Rank Answer Posted By  
 Question Submitted By :: Kamal
This Interview Question Asked @   CTS
I also faced this Question!!   © ALL Interview .com
Answer
required field valodator is used to check where a browser
has entered a value in atextbox or not.
 
4
Vijay
 
 
Answer
Hi,
We can add the code in page_load

If Me.RadioButton1.Checked = True Then
            Button1.CausesValidation = True
        Else
            If Me.RadioButton2.Checked = True Then
                Me.Button1.CausesValidation = False
            End If
        End If
 
5
Smriti
 
 
Answer
Required Field Validator does not depend upon any server 
control either it is enable or disable.Means if radio 
button1 is enable and radiobutton2 is disable at same time 
then u press button then by default validation control 
fired also in vice-versa case
 
0
Prakash
 
 
Answer
Set causes validation on the button to false. Add a custom 
javascript function to the onclick event of that button. In 
the javascript function check whether the radio button is 
checked or not then. If checked call ValidatorEnable
(regValidatorId, true) and then call Page_ClientValidate() 
function.
 
0
Vijay
 
 
Answer
Required validator checks for TextBox empty or not..

so to solve this problem

RequiredField validator--->properties..>validationGroup:sbmt
Button                 --->properties..>validationGroup:sbmt
 
0
Ranga
 
 
Answer
Set both radio buttons AutoPostBack property to true.

and following code in page_load:

 if (RadioButtonNo.Checked == true)
        {
            this.Button1.CausesValidation = false;
        }
        else
        {
            this.Button1.CausesValidation = true;
        }
 
0
Yogesh Sharma
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com