Posts

Showing posts from April, 2014

C# Keyword Code

C# Parameters Ref using System; class Program { static void Main() { int val = 0; Example1(val); Console.WriteLine(val); // Still 0! Example2( ref val); Console.WriteLine(val); // Now 2! Example3( out val); Console.WriteLine(val); // Now 3! } static void Example1(int value) { value = 1; } static void Example2( ref int value) { value = 2; } static void Example3( out int value) { value = 3; } } Output 0 2 3

C# Code

 public virtual IEnumerable<T> GetAllForAutocomplete(string filedName,string fieldvalue)         {             string strWhereCondition = "where ";             if ((PetaPoco.Internal.PocoData.ForType(typeof(T))).Columns.ContainsKey(filedName))             {                 if ((PetaPoco.Internal.PocoData.ForType(typeof(T))).Columns.ContainsKey("IsDeleted"))                 {                     strWhereCondition += "IsDeleted=0 ";                 }                 strWhereCondition += "AND " + filedName + " = '" + fieldvalue+"'";             }             var dbresult = _unitOfWork.Db.Fetch<T>(strWhereCondition);             return dbresult;         } ***************************************************************************  public virtual IEnumerable<T> GetAllByParam(IDictionary<string, string> data)         {             string strWhereCondition = "";          

JavaScript Questions and Answers

Image
Introduction Below is the list of latest and updated JavaScript interview questions and their answers for freshers as well as experienced users. These interview questions will help you to prepare for the interviews, So let's start.... JavaScript Interview Questions for both Experienced Programmers and Freshers 1) What is JavaScript?   Ans:JavaScript is a scripting language most often used for client-side web development. 2) What is the difference between JavaScript and Jscript?   Ans:Both JavaScript and Jscript are almost similar. JavaScript was developed by Netscape. Microsoft reverse engineered Javascript and called it JScript. 3) How do we add JavaScript onto a web page?   Ans:There are several way for adding JavaScript on a web page, but there are two ways which are commonly used by developers If your script code is very short and only for single page, then following ways are the best: a) You can place   <script type="text/javascript">   tag inside t