Hope everyone must have come across static keyword while doing development, specifically using C#. Static modifier is used to declare static member, which means it belong to the type itself. Well, as part of this article, I’m not going to discuss more about static as it will increase the length of this writeup. public class Logger { public static int GetLogLevel( string logType) { … } } Above is a sample code snippet wherein, we have a class called Logger and it has a static method called GetLogLevel . Now in order to call this GetLogLevel(…) method, first we have to add the required namespace, where this Logger class has been defined. Something like this, using Planner.Utilities; Well, nothing new as of now. Next, let’s have a look at, how to make a call to this static method. int logLevel = Logger.GetLogLevel(fileLog); Till here, nothing that bad, but we do have a room to improve our code by making it more readable and cleaner.
This blog is all about my technical learnings pertaining to LLM, OpenAI, Azure OpenAI, C#, Azure, Python, AI, ML, Visual Studio Code and many more.