1)can we mention public to interface ?
Interfaces declared directly within a namespace can be declared as public or internal and, just like classes and structs, interfaces default to internal access. Interface members are always public because the purpose of an interface is to enable other types to access a class or struct. No access modifiers can be applied to interface members.
2)what is the default access modifier to class ?
Classes that are declared directly within a namespace (in other words, that are not nested within other classes) can be either public or internal. Internal is the default if no access modifier is specified.
The access level for class members, nested classes, is private by default.
The access level for class members, nested classes, is private by default.
3)what is the page life cycle ?
4)what do u mean by view state?
5)how can we dynamically change the master pages ? which stage ?
In Page_Init event write the following..
This.MasterPageFile=”~/abc.master”;
6)what is the rennder event do? why do it wtites html to browser?
7)how can we make a method in class not to override in base ?
By declaring it as sealed method..
Note: If an instance method declaration includes the
sealed
modifier, it must also include the override
modifier. Use of the sealed
modifier prevents a derived class from further overriding the method. public class AAAA
{
public virtual void XXXX()
{
Console.WriteLine("Method XXXX");
}
public virtual void ZZZZ()
{
Console.WriteLine("Method ZZZZ");
}
}
public class BBBB : AAAA
{
//This stops further overriding method XXXX()....
sealed public override void XXXX()
{
Console.WriteLine("Override Method XXXX");
}
public override void ZZZZ()
{
Console.WriteLine("Override Method ZZZZ");
}
}
public class CCCC : BBBB
{
public override void ZZZZ()
{
Console.WriteLine("Override Method ZZZZ in CCCC Class");
}
//You cannot override method XXXX() here as it is declared as Sealed
//in parent class BBBB.
}
8)can we create a instance of abstarct class?
No..
9)why dictonarybase is used with hashtable ?
10)what do u mean by worker process?
The "Process" which is responsible for processing Asp.net application request and sending back response to the client , is known as "Worker Process". All ASP.NET functionalities runs within the scope of this process."
So finally I can write it...
"Process which is responsible for all asp.net requests and response cycle is known as worker process."
So finally I can write it...
"Process which is responsible for all asp.net requests and response cycle is known as worker process."
11)what is jit, how many are there nad hoe will you set each of them in the project ?
12)how can we pass values from one page to other pages?
14)wha is the difference between dataset and datareder ?
15)how will you invoke the webconfig connection string in the application ? with syntax.
SqlConnection Con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ConnectionString);
16)waht do u mean by appdomain ?
An Application Domain is a light weight process and provides a logical and physical isolation from another .NET application.This ensures that the Applications can work independent and isolated of each other. An Application Domain is created by the Common Language Runtime (CLR) and it ensures that if one Application Domain crashes or goes down, it does not in any way effect the functioning of another Application Domain. Multiple .NET applications can be executed in one single process by loading these applications in separate Application Domains. Several threads can be executing in a single application domain at any given time and a particular thread is not confined to a single application domain. In other words, threads are free to cross application domain boundaries and a new thread is not created for each application domain. The following are the benefits of Application Domains.
Isolation of code, data and configuration information of one application from another
A failure in one application will not affect the other
17)which iis version is running now ?
IIS 7.5
IIS 7.5
18)how to install .dll in gac ? with syntax.
Gacutil -i AssemblyName.dll
19)what do u mean by wcf and what is its advantages over remoting and webservices ?
Web Services are platform and language independent, and don't care about the consuming application. But it has restrictions of the HTTP protocol. Performance-wise, they are considered slow.
WCF can be hosted under the Windows environment, but it can be utilized by clients of different languages and different platforms.
XML Web Services use SOAP, i.e., XML via HTTP.
20)what do you mean by dataview?
21)how to get only modified rows in a table ?
ds.Tables(0).GetChagnes(DatarowState.Modified)
ds.Tables(0).GetChagnes(DatarowState.Modified)
22)how to make relation in a dataset with systax?
If ds Dataset has two tables "Employees" and "Dept" and both have a common column "DeptID" then relation can be written as follows....
ds.Relations.Add("RalationName", ds.Tables["Employees"].Columns["DeptID"], ds.Tables["Dept"].Columns["DeptID"])
23)where do the view state saved ?
Http hidden fields..
Http hidden fields..
24)where is the web.config saved ?
25)how many web.config can be there in a application?
Each folder in web application can contain one web.config file. Files in the folder take the configuration settings from the web.config file which is in that particular folder. An application root directory contains one web.config file.
Each folder in web application can contain one web.config file. Files in the folder take the configuration settings from the web.config file which is in that particular folder. An application root directory contains one web.config file.
26)how many app.config files can be present for a application ?
27)how many machine.config file can be there in a application ?
28)can we have two appconfig files in machine with two applications?
29)what is are the four parts in the publickeytoken ?
<major version>.<minor version>.<build number>.<revision>
For example, version 1.5.1254.0 indicates 1 as the major version, 5 as the minor version, 1254 as the build number, and 0 as the revision number.
30)how will you pass the connection string in your application ?
31)what is the differnce between delete and truncate ?
- “Drop Table”
- The DROP command removes a table from the database. All the tables' rows, indexes and privileges will also be removed. No DML triggers will be fired. The operation cannot be rolled back.
- “Truncate Table”
- TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster
- Deleted records are not recorded in the transaction log.
- “Delete Table”
- All rows will be removed. After performing a DELETE operation you need to COMMIT or ROLLBACK the transaction to make the change permanent or to undo it. Note that this operation will cause all DELETE triggers on the table to fire.
- It records each deletion in the transaction log
32)waht do u mean by indexs ?
34)if you create a primarykey which index will be formed?
Clustered Index
35)what is the disadvantage of clustered indexs?
If we update a record and change the value of an indexed column in a clustered index, the database might need to move the entire row into a new position to keep the rows in sorted order. This behavior essentially turns an update query into a DELETE followed by an INSERT, with an obvious decrease in performance. A table's clustered index can often be found on the primary key or a foreign key column, because key values generally do not change once a record is inserted into the database.
Good Article On Indexes.
36)what is the difference between having and group by claues ?
Having clause is used with group by clause to filter out records in a group.
Having clause is used with group by clause to filter out records in a group.
37)wher we will use the having clause ?
Having clause is used with group by clause to filter out records in a group.
Having clause is used with group by clause to filter out records in a group.
38)can you get the number and count of the number in a table, write the query ?
example:- 1
1
2
3
3
3
result should be:- 1 - 2, 2-1, 3-3
select Col1, count(Col1) from Table group by Col1
39)what are the constraints, how many are there and what are they ?
Common types of constraints include the following:
- NOT NULL Constraint: Ensures that a column cannot have NULL value.
- DEFAULT Constraint: Provides a default value for a column when none is specified.
- UNIQUE Constraint: Ensures that all values in a column are different.
- CHECK Constraint: Makes sure that all values in a column satisfy certain criteria.
- Primary Key Constraint: Used to uniquely identify a row in the table.
- Foreign Key Constraint: Used to ensure referential integrity of the data.
40)difference between union and unionall ?
41)what is the difference between primary key and unique key?
44)does a uniquekey contains 2 null values ?
Yes..There is no restriction of having NULL values in column defined as UNIQUE. So you can have as many NULL values as there are rows in the table.
create table test (id varchar2(10) unique)
/
insert into test values (null)
/
insert into test values (null)
/
insert into test values (null)
above statements can be executed without any error.
A Unique key constraint column accepts as many no of nulls as it can.
45)why do we use indexs?
46)* How to use a interface having 100 methods? but we want to use only 2 methods?
Derive an abstract class from that interface and implement only as many no of methods as you require and declare rest of the methods as abstract.
Derive an abstract class from that interface and implement only as many no of methods as you require and declare rest of the methods as abstract.
interface MyInterface
{
void AAAA();
void BBBB();
void CCCC();
void DDDD();
}
public abstract class MyClass : MyInterface
{
public void AAAA()
{
}
public abstract void BBBB();
public abstract void CCCC();
public abstract void DDDD();
}
47)what do u mean by session state ?
48)if you write some text in a textboxes in a webpage and now if you refresh the page the text will be cleared or not? and Why ?
Data entered in textbox will not be cleared. When you enter value in textbox, it puts it into viewstate. So data will not be cleared.
-------------------- telephonic
49) what is a thread?
50)what are delegates how many are there what is the differnce?
51)
53)how will you call the main thread?
54)can we invoke the delegate without registering the event to it?
55)how can we syncronus and asyncronus threads ?
56)can we implement interface to a abetract class ?
57)how to make a thread to work in the backgroung ?
58)what does a interface contains?
59)what is the dif b/w interface and abstract class ?
60)how can we use a view to update the table? write syntax ?
61)what do u mean by normalization ?
62)what is shadowing(vb.net) Hiding(C#)?
Re-define the implementation of a method in base class in derived class.
63)what do u mean by acceptchanges?
When you have call the AcceptChanges method on dataset, all changes in dataset are retained and every row state has been changed to Unchanged state.
64) if change the data in a grid and call default view into a dataview does
the row contains original or updated version of the row ?
65)how can we make a class non inheritable ?
sealed
66)can we declare a delegate in the interface?
No..
67)what are the difference between sp and udf ?
http://dotnetnotepad.blogspot.com/2010/09/difference-bw-stored-proc-and-function.html
68)can we use udfs in sps ?
Yes...
69)how will control the syncronization of threads ?
70)what are the main c# changes in .net2.0 and 3.5 ?
http://www.developer.com/print.php/3561756
71)what do u mean by encapsulation ?
72)what do u mean by abstraction ?
73)what is the difference between list and array list ?
Arraylist: Arraylist can accept any type of data. Internally it converts them as objects. So When you try to retrieve data, which is in the form of object, that should be un-boxed. Here boxing and un boxing is happen.
List: List is a strongly typed one and no boxing and unboxing is required as it is strongly typed.
74)what do u mean by finalizer ?
75)what is garbage collection?
76)can we have a error handling in stored procedure ?
77)what does a connection string consists of ?
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.