C#, C++, VB, WPF,Angular 2,Angular JS, WCF, WF, MVC, Typescript,ASP.NET, ORACLE, SQL SERVER, SYBASE,Classic ASP, VB6, Dev Express, Visual Studio Add-ins,Windows Service,Web Service, Winforms, Windows Phone, XSLT, JQuery, CSS, JSon, LINQ, EntityFramework, Performance, Problems & Solutions, Batch File, CMD, Data structure and Algorithm, Automation, SGML, Javascript,XAML,Network
Friday, 27 February 2026
Interface Segregation Principle - SOLID Principle
Saturday, 21 February 2026
Liskov Substitution Principle - SOLID Principle using C# in .NET10
In this article are going to see what is Liskov Substitution Principle, Objects of the super class can be replaced by objects of the sub classes with out breaking the correctness of the program..
We take one example we take Shape class where we have the Area method which will calculate the area, but when you see the Square which will break the behaviour, if the values are not Equal. the Values of the variable are needs to be Equal for Square
How we make this class to LSP, the Base class behaviour should not broke, so we slightly change the code which adhere to Liskov substitution principle.
From the above code you can learn what is Liskov Substitution Principle.
Monday, 16 February 2026
Open Closed Principle - SOLID Principle
In this article we are going to see what is Open Closed Principle (OCP) in SOLID. OCP is open for extension and closed for modification. that means a class can be extended through override and not allow to modify.
we see Employee class in which GetSalary is used to fetch the salary this method can be override in Manager class which is derived from employee class but not allow to modify the employee class.
From this article you can learn the Open Closed Principle
Monday, 22 April 2019
Quick Sorting C#
Quick Sort :
Quick Sort is a Divide and conquer algorithm, It divides the collection int to two sub sets based on the pivot element selected, one subset is a collection elements which is smaller than pivot, another subset is collection of elements consists of larger than pivot.then each subsets are undergoes following steps again.Entire sort can be done in O(log n)
Steps :
1. Consider a element as Pivot from the List.
2. ReOrder the list so the elements which are lesser than pivot arrange previous in the order of the pivot and the elements which are higher than pivot arrange next in the order of the pivot.
3. Recursively apply the above steps to each two subsets individually.
Algorithm :
Now Let we see this implementation in C#
First Derive a Generic List<T> which is comparable, Then add collection to it ,Add a additional method to it as Order to order a collection based on the Quick Sort by implementing the algorithm. Following type in Generic so any data type can be sorted using this.
Output :
From this article you can learn the Generic Quick Sorting algorithm in C# and the process of algorithm.
Calling a method in dll using Reflection
first create a Dll using class library project with following code,
This class operation consists of two methods one for addition and another for subtraction, Now a dll is generated Mathematics.dll
Now create a Console application which is used to load the dll at runtime , and execute the subtracion at runtime with out adding reference.
Output :
From this article you can learn how to load dll in runtime.
Speaking the Text written in Notepad C#
Virtual Human : Click here to download EXE
Browse the text file or type the text in textbox then hit speak button , system starts to speak ur content in your preferred voice mode male or female voice by the selection of radio button.
If you want to save the speech as wav you can save the speech by hit save , save options only enable when you stop the speech
Output:
Load the Text File.
Save the audio by hit save.
Code :
I Hope this article will give you detailed about speech class in c#.
Timer trigger in web job Azure
TimerTrigger is the attribute which does the trigger for execute a function at certain intervals in webjob.
Code:
class Program { static void Main(string[] args) { JobHostConfiguration config = new JobHostConfiguration(); config.NameResolver = new TriggerResolver(); config.UseTimers(); JobHost host = new JobHost(config); host.RunAndBlock(); } private class TriggerResolver: INameResolver { public string Resolve(string name) { string value = ConfigurationManager.AppSettings[name]; } } } public class Startup { public static void ScheduleTrigger([TimerTrigger("%Schedule%")] TimerInfo timer) { } } }
From the above code you can see the schedule information is loaded from configuration file using INameResolver interface
Configuration value:
<add key=”Schedule” value=”24:00:00″/>
in another way we can schedule the timer using the typeof a class or cron expression
public static void LoggingFunction([TimerTrigger("0 0 6 * * *", RunOnStartup = false)] TimerInfo timerInfo, TextWriter log) { //Do stuff every day at 6AM }
in the above cron expression
* * * * * * command to be executed
{second} {minute} {hour} {day} {month} {day-of-week}From this post you can learn Timer Trigger in Azure webjobs
Mock HttpClient Using Moq
Above class is a model class





