AspBucket offers ASP.NET, C#, VB, Jquery, CSS, Ajax, SQL tutorials. It is the best place for programmers to learn

Latest Posts

Monday, 27 September 2021

Priority queue implementation using BlockingCollection

 



In this article We will discuss about priority queue implementation. 

Problem statement:
  1. There are multiple queue Queue 1, Queue 2, Queue 3..... etc.
  2. Queue 1 have higher priority than Queue 2 and Queue 2 have higher priority than queue 3 same pattern will be followed for other queues.
  3. Elements can be pass to the queue at any point time.
  4. Element priority will be depend on queue periority & elements inside the current queue.

Thursday, 29 October 2020

Display the text over notify icon image in Windows Application(Win forms, WPF)

 In current post we will discuss how to write text over the image. An application that runs on system tray and occasionally shows notification using the system tray default notifications. Below code could be helpful to modify the icon tray of image.





Tuesday, 18 December 2018

Bubble sort in c#

Bubble sort is the simplest sorting algorithm. As per name the sorting will be done sequentially by iterating down an array to be sorted from the first element to the last, comparing each pair of elements and switching their positions if necessary. This process is repeated as many times as necessary, until the array is sorted.

Tuesday, 27 November 2018

Inversion of Control and how it's different from the dependency inversion principle?

Most of the people mix the DIP, IOC and DI together but, Inversion of Control is part of a dependency inversion principle.  As per  dependency inversion principle high level module should not be dependent on lower level modules so Inversion of Control is a way to solve this problem.

Dependency inversion Principle

Dependency Inversion principle is a part of SOLID principle. It was given by Bob Martin, who is founder of SOLID principles.

Bob's Definition

  • High level module should not be dependent on lower level modules. Both should dependent on abstraction.
  • Abstraction should not dependent on details. Details should be dependent on abstraction.
  • Popular Posts
  • Comments