Category: C#

code for reverse string in c# and find duplicate record in jquery

static string reverse(string ss) { string[] strArray = ss.Split(‘ ‘) ; string revs=””; //int i = strArray.Length; StringBuilder sb = new StringBuilder(); for (int i = 0; i < strArray.Length; i++)   { string ty = string.Join(“”,strArray[i].Reverse().ToArray()); //            string firstLetter = strArray[i].Substring(0, 1); string firstLetter = ty.Substring(0, 1); //string secondPart = strArray[i].Substring(strArray[i].Length -2 ,0); string secondPart = ty.Substring(1);   sb.Append(firstLetter.ToUpper()… Read more →

IEnumerable VS IQueryable

IEnumerable IEnumerable exists in System.Collections Namespace. IEnumerable can move forward only over a collection, it can’t move backward and between the items. IEnumerable is best to query data from in-memory collections like List, Array etc. While query data from database, IEnumerable execute select query on server side, load data in-memory on client side and then filter data. IEnumerable is suitable… Read more →

Difference between document.ready and window.onload or pageLoad

$(document).ready() Best for onetime initialization. Called as soon as DOM is ready; may called slightly before than pageLoad(). Cross browser compatible. Unable to re-attach the functionality to elements/controls of the page affected by partial postbacks. pageLoad() Not best for onetime initialization if used with UpdatePanel. Not Cross browser compatible. Best to re-attach the functionality to elements/controls of the page affected… Read more →

Memory management in .Net

main concern for any application whether application is window based or web based. In .Net, CLR has garbage collector that executes as a part of our program and responsible for reclaiming the memory of no longer used objects. Garbage collector free the memory for objects that are no longer referenced and keeps the memory for future allocations. Advantage of Garbage… Read more →

Latest updated questions

1.caching maintain through if each server has different load. 2.try catch recursive means multiple try-catch in catch statement. 3.overload in properties and operator overloading 4.dropdown bind through list 5.mutuable and immutable difference. 6.role of beginrequest. 7.discuss abouthttpcontext,httpmodule,httphandler . 8.what is wrapper class. 9.role of sealed,abstract and static. 10.difference between .equals,hashcode and == x=5?”ram”:”null”……….is it same work as if-else statement.… Read more →

Enum and Enumerable data

An enum is a custom data type of Name/Value pair.An enumeration is a class or structure that implements .net interface named Ienumerable. Typically, this interface is implemented on collection classes, as well as the System.Array class // Compile-time error! 999 is too big for a byte! enum EmpType : byte { Manager = 10, Grunt = 1, Contractor = 100,… Read more →

Difference between linq and lambda expression

LINQ is a querying technology (Language Integrated Query). LINQ makes extensive use of lambda’s as arguments to standard query operator methods such as the Where clause. A lambda expression is an anonymous function that contain expressions and statements. It is completely separate and distinct from LINQ. Read more →