Sunday, January 9, 2011

What is Asynchronous One-Way Calls?


asynchronise one way calls means.
One-way calls are different from asynchronous calls from execution angle that the .NET Framework does not guarantee their execution. In addition, the methods used in this kind of call cannot have return values or out parameters. One-way calls are defined by using [OneWay()] attribute in class.

what is difference between manual reset event and auto reset event.


the difference between the manual reset event and auto reset event are as following.
The difference between them is if 10 threads are waiting for a ManualReset event then all of them will start executing unless some thread programmatically (manually) resets it.

In case of autoreset in the same scenario only 1 thread will start executing & the event will be automatically reset so other threads will have to wait.

what is an application domain?


the application domain means.
The logical and physical boundary created around every .NET application by the Common Language Runtime (CLR). The CLR can allow multiple .NET applications to be run in a single process by loading them into separate application domains. The CLR isolates each application domain from all other application domains and prevents the configuration, security, or stability of a running .NET applications from affecting other applications. Objects can only be moved between application domains by the use of remoting.

Display Gridview data in Upper case using RowDataBound event


You just need to add RowDataBound event. In which you have to set all text data  in upper case.
.aspx code:
    <asp:GridView ID="GridView1" runat="server" OnRowDataBound="GridView1_RowDataBound">
    </asp:GridView>
.aspx.cs code :
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
         for (int i = 0; i < e.Row.Cells.Count; i++)
        {
             e.Row.Cells[i].Text = e.Row.Cells[i].Text.ToUpper();
        }
     }

Difference between Function Overloading and Overriding


Function overloading Function Overriding
In function Overloading :-
Same name but different type and/or number of argument.
Share same name for separate methods.
called Static polymorphisam,Compile Time Binding.
In function Overriding:-

Same name and same argument but found in base and derived class.
Disables the superclass method.
calledDynamic polymorphisam, runtime Binding.

Get table information of Sql server database.


Sql Query:
select * FROM sysobjects

it will show the details of all system table and users table

if you want information of specific table,then you can specify table name in where clause.

ex.
select *
FROM sysobjects
where name='table_name_here'

Use of Sealed class


Sealed class is used to restrict the user from inheriting in another class.
For defining sealed class, you have to define a class with prefix sealed keyword.
Once you define a class with sealed keyword, user can not inherit further.
How to create:
sealed class Sealedclassdeom
{
}