What is an assembly?

What is an assembly?


  • An Assembly is a  logical unit of code
  • Assembly physically exist as DLLs or EXEs
  • One assembly can contain one or more files
  • The constituent files can include any file types like image files, text files etc. along with DLLs or EXEs
  • When you compile your source code by default the exe/dll generated is actually an assembly
  • Unless your code is bundled as assembly it can not be used in any other application
  • When you talk about version of a component you are actually talking about version of the assembly to which the component belongs.
  • Every assembly file contains information about itself. This information is called as Assembly Manifest. 

Accepting Your Valuable Comments....Please Give Feedback...
...........or.............
Submit your ASP.NET Questions/ php questions/MySql questions/ sql Server questions.

always welcome...

Important SQL Queries related to Employee table

Important SQL Queries related to Employee table ( highest salary, second highest salary, etc )


Write a query to get the details of emp where ename can start with any character from A to S

SELECT * FROM EMP WHERE ENAME LIKE ‘[A-S]%’                                                                                                                                                                                
Write a query to get the highest salary from each department

SELECT DEPTNO, MAX(SAL) FROM EMP GROUP BY DEPTNO

Write a query to get the second highest salary from the Employee table.

Without using LIMIT:

SELECT MAX(salary) FROM Employee 
WHERE Salary NOT IN ( SELECT Max(Salary) FROM Employee);

SELECT MAX(Salary) From Employee
WHERE Salary < ( SELECT Max(Salary) FROM Employee);

With using LIMIT:

SELECT * FROM Employee
ORDER BY salary DESC LIMIT 1,1;

SQL Query to select Nth highest salary

SELECT salary 
FROM Employee
ORDER BY salary desc limit n-1,1

The following query will return 3rd highest salary
SELECT salary 
FROM Employee
ORDER BY salary desc limit 2,1

 Second Highest Salary or Nth Highest Salary With using dense_rank():

SELECT * FROM(

SELECT ename, sal, dense_rank() 

over(order by sal desc)r FROM Employee

) WHERE r=&n;

-- ----------------

SELECT * FROM(

SELECT ename, sal, dense_rank() 

over(order by sal desc)r FROM Employee

) WHERE r=2;



Write a query to get the highest salary from each job in each dept

SELECT DEPTNO, JOB, MAX(SAL) FROM EMP GROUP BY DEPTNO,JOB

Write a query to display no. of clerks present in each department.

SELECT DEPTNO, COUNT(*) FROM EMP WHERE JOB=‘CLERK’

Write a query to get details of employees who is getting the highest salary in each department

SELECT * FROM EMP WHERE SAL IN(SELECT MAX(SAL) FROM EMP GROUP BY DEPTNO)

Write a query to get the details of the employee who is getting the highest salary in deptno 10.

SELECT * FROM EMP WHERE SAL > (SELECT MAX(SAL) FROM EMP WHERE DEPTNO=10)

___________________________________________________________


OOPS inteview questions:

OOPS inteview questions:

1.Does C# support multiple-inheritance? 
No. But you can use Interfaces.
2.Where is a protected class-level variable available? 
It is available to any sub-class derived from base class
3.Are private class-level variables inherited? 
Yes, but they are not accessible. 
4.Describe the accessibility modifier “protected internal”. 
It is available to classes that are within the same assembly and derived from the specified base class. 
6.Which class is at the top of .NET class hierarchy? 
System.Object. 
7.What does the term immutable mean?
The data value may not be changed. 
Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory. 
8.What’s the difference between System.String and System.Text.StringBuilder classes?
System.String is immutable. 
System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed. 
9.What’s the advantage of using System.Text.StringBuilder over System.String?
StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new instance in memory is created.
10.Can you store multiple data types in System.Array?    
   : - No
11.What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.
12.How can you sort the elements of the array in descending order?
By calling Sort() and then Reverse() methods. 13. What’s the .NET collection class that allows an element to be accessed using a unique key?
HashTable. 
17.Can multiple catch blocks be executed for a single try statement?
No. Once the proper catch block processed, control is transferred to the finally block.
18.Explain the three services model commonly know as a three-tier application?
Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources). 
____________________________________________________________________________________________
.......See More Popular Posts: