Events and Event handlers Event handling is an important feature of most applications.Event is an action performed by an end user or some application component to notify the application.Common example of events are: User clicking a button on the User Interface or pressing a shortcut key. Notification by a database component when a new record is inserted […]
Compare List elements in C# using LINQ
LINQ extension methods are used to perform queries on the lists and collections.We can use C# for the LINQ queries rather using any other language such as SQL. We can Compare List elements in C# using LINQ ,by using the extension methods. To compare lists using LINQ there is a SequenceEqual extension method provided by the framework.If […]
Implicitly typed variables in C#
Instead of explicitly declaring the variable of a specific type ,in the case of implicitly typed variable compiler determines the type of the variable.For example to declare a variable of int type we use the following declaration int x=1; in this case we are explicitly declaring variable of an int type.We can write the same […]
Functions in SQL Server
Function is a group of T-SQL statements used for defining reusable logic.Unlike stored procedure function always returns some value.The return value can be of different data types such as a table or a single scalar value. Also the only way to return a value from a function is through the return value as functions don’t have […]
Date formatting in C#
While working with dates two of the most common requirements are: Converting date to strings This is usually for displaying the dates to a user in easier to understand representation. Converting strings to date This could be for different reasons such as performing calculations and extracting specific parts of the date such as month and year. Date […]