MSDEVBUILD - Community of Microsoft AI, Azure and Xamarin by Suthahar - Solution Architect for Microsoft AI, Azure, Xamarin | Tech Author and Speaker
Microsoft announced a new Foundational C# certification in collaboration with FreeCodeCamp. The Foundational C# certification is completely free for individuals in all regions. The certification includes a 35-hour C# training course hosted on Microsoft Learn and requires completing an 80-question C# certification exam. It's very interesting for those who want to start developing programming skills in C#. This is a great choice, as after completing this certification, you will acquire all the essential C# programming skills and learn tips and tricks.
Without further delay, let's get started, and I will guide you through the certification process step by step.
Create an Account in the Microsoft Learn:
Complete C# Self Learning Course in Microsoft Learn:
Step 3: Complete the training content on Microsoft Learn. (Note: If you have previously completed the training content, you do not need to redo it)
Unable to Verify Trophy in Microsoft Platform :
In this article, we will discuss Microsoft introduced new types DateOnly and TimeOnly in C# and examine the unique functionalities offered by each, and assist in determining the suitable choice for different scenarios.
DateOnly and TimeOnly are value types introduced in .Net 6. These types are part of the .net Date and Time and offer unique advantages over using traditional DateTime for specific use cases that require working with only dates or times without the associated time zone information.Use DateOnly when you need to work with dates exclusively, without any time information. Examples of this include handling birthdays, anniversaries, and event dates.
For example, if you were to gather DOB from users, the optimum data type would be Date only as you wouldn't need timezone information and would only need the date, year, and month.Use TimeOnly when you require time values without any date information. Examples include representing opening/closing times, countdowns, and scheduling alarms.
In C#, DateTime is a value type and commonly used in all the programming languages, You should use DateTime when you need to work with both date and time components together or when you require time zone information.
DateTime provides a complete representation of a specific point in time, combining both date and time information along with an optional time zone offset. here you can find some use cases where DateTime is more appropriate than using DateOnly or TimeOnly
Hope this article will help you, the choice between DateTime, DateOnly, and TimeOnly should be driven by the specific needs of your application.
If your application primarily deals with only dates or times, and you don't require time zone support or date and time together, then DateOnly and TimeOnly can be more appropriate for improved code clarity and safety. However, if you need to represent points in time with both date and time information, DateTime is the suitable choice.
During development and everyday use, Substring is often the go-to choice for string manipulation. However, there are cases where Substring c...