Design Pattern – Abstract Factory

C# CONCEPTSAccording to Gang of Four, abstract factory patterns can be assumed as the factory for creating factories.Learning ObjectivesWhat is the abstract factory design pattern?How to write code using the abstract factory design pattern?How to create a factory provider?How to create a client application(from the Main method) that uses factory providerPrerequisitesAbstract factory pattern is purely … Continue reading Design Pattern – Abstract Factory

Design Pattern – Factory Method

C# CONCEPTSAccording to the Gang of Four, the factory method allows the subclass to determine which class object should be created.Photo by Life Of Pix from PexelsLearning ObjectivesWhat is the factory method design pattern?How to write code using the factory method?PrerequisitesBasic knowledge of OOPS concepts.Any programming language knowledge.The article demonstrates the factory method using the C# programming … Continue reading Design Pattern – Factory Method

Default value expressions

C# CONCEPTSA default expression returns the default value of a type.Learning ObjectivesThe article demonstrates how to useDefault OperatorDefault LiteralPrerequisitesExperience in basic concepts of C#.Install latest visual studio community edition.Getting StartedDefault OperatorThe default operator accepts only the name of a type or a type parameter.ExampleConsole.WriteLine(default(int)); // output: 0 Console.WriteLine(default(object) is null); // output: TrueExample with Genericsvoid DisplayDefaultOf<T>() { var … Continue reading Default value expressions

Main() method Return Types

C# CONCEPTSThe main method can also return a value.Photo by Sam Dan Truong on UnsplashIn programming languages, we have always seen the main() method return type is void.static void Main() { //Statements }But it can be “int” also.static int Main() { //Statements return 100; }Rules of return codesIf the return value from the Main is not utilized, returning … Continue reading Main() method Return Types

Kubernetes serverless functions in Python

SERVERLESS PROGRAMMINGLearn to create a Kubernetes serverless function POST route in Python using a Fission frameworkFor more information about the Fission framework and basic commands to start with. Follow below link:This article demonstrates:Add Python environment in Fission.Add two numbers using the POST route in Python.Test Fission routes command line.Add Python environmentFission language support will be … Continue reading Kubernetes serverless functions in Python