Posts

Showing posts from 2015

How to get Department wise number of employee.

Emid EmpName salary DepatiD 1 A 1000 1 2 B 1250 2 3 C 1600 3 4 D 1800 2 5 E 1980 3 Select COUNT ( DepatiD ) as 'No of Emp' , DepatiD  from mstEmp1 group by DepatiD No of Emp           DepatiD 1                          1 2                          2 2                          3

.NET Interview Questions

1.what is Aggregation,Composition in oops 2.what is Model schema view in SQL? 3.what is restful services 4.what is WCF services? 5.what is clustered index and non cluster index can we create noncluster index with primary key ? 6.How many types of function in SQL ?? 7 What is custom control  and user control 8.what is CTE ?? what is diff between CTE and Temp table ? 9.what is cloud services and azure services ?? have you worked on it ? 10. what is anonymous in c#? 11.What is Net page life cycle ?? 1.What is Mutable and immutable.How can we create immutable class. 2.what is Manage code ? Un managed code. 3.What we have to do release Object ?? 4.what is Idisposible Interface? 5.What is CTS ? 6.How can we use  . EXE in .net ? 7.App logging Library? 8.what is state management and purpose of state management why we use it ? 9.What is application level variable? 10. OOPs Concepts? 11. What is memory allocation? ...

Multiple DataTextField In Dropdownlist in Asp.Net C#

Image
  DataTable dt = ds.Tables[0];   if (dt.Rows.Count > 0)                     {                         Dictionary<int, string> lst = new Dictionary<int, string>();                         foreach (DataRow row in dt.Rows)                         {                             //Add values to Dictionary                             string val = row[1].ToString() + " " + row[2].ToString() + " - " + row[3].ToString();                             lst.Add(Convert.ToInt32(row[0]), val);           ...

Store data from DataTable to List Generic Class in c#

A  List  is a strongly typed list of objects that can be accessed by index.  It can be found under  System.Collections.Generic  namespace.     DataTable dt = ds.Tables[0];     List<clsDispatch> DispatchDetails = new List<clsDispatch>();                 List<clsDispatch> DispatchDetails = new List<clsDispatch>();                         DispatchDetails = (from DataRow row in dt.Rows                                select new clsDispatch                                {                                    DespID = Convert.ToInt64(row["DespID"].ToString()), ...

SQL INTERVIEW QUERIES QUESTIONS AND ANSWERS WITH EXAMPLE FOR FRESHIER SET-1

Image
This is 1st post related to sql interview queries with examples. This post contains questions for both fresher and experienced developers. How to get second highest salary from Salary Master Table in SQL ? How to get Department wise total salary  form Department Master and Salary Master ?

Can two methods have same name with different return types in c#?

return type is different. Method name & argument list same.   public class MyClass     {         public double Test(int x)         {             return x * 120;                 }         public int Test(int x)         {             return x * 120;         }    }           class Program     {         static void Main(string[] args)         {                                MyClass obj = new MyClass();             obj.Test(12);             Console.WriteLine();             Console....

What is an abstract class, and when it should be used?

//Abstract classes are classes that contain one or more abstract methods. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AbstractClass {     class Program     {         static void Main(string[] args)         {             Dog obj = new Dog();             obj.makeNoise();         }     }     // Note that the abstract keyword is used to denote both an abstract method, and an abstract class.     // we can not create instance of Abstract class     // By using abstract classes, you can inherit the implementation of other (non-abstract) methods.     // You can't do that with interfaces - an interface cannot provide any method implementations.    public abstract class Animal     {         ...

How to get Number From String in c#

                        How to get Number From String in c#                   string a = "A1B2C3D4E5";                 string b = string.Empty;                 string c = string.Empty;                 int val;                 for (int i = 0; i < a.Length; i++)                 {                     if (Char.IsDigit(a[i]))                         b += a[i];                     else                         c += a[i];           ...

Function overloading and return type

Function overloading and return type For example, the following program C++ and Java programs fail in compilation. C++ Program int DESCRIBE() {      return 10; }   char DESCRIBE () {  // compiler error; new declaration of DESCRIBE ()      return 'a' ; }   int main() {      char x = DESCRIBE ();      getchar ();      return 0; } Java Program // filename Main.java public class Main {      public int DESCRIBE () {          return 10;      }      public char DESCRIBE () { // compiler error: DESCRIBE () is already defined          return 'a' ;      }      public static void main(String args[])    ...