Create a folder anywhere in Windows Desktop
Rename the folder with GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
and open and see the magic.
Share your reaction in the comment section.
Create a folder anywhere in Windows Desktop
Rename the folder with GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
and open and see the magic.
Share your reaction in the comment section.
Friendly reminder about C# expression-bodied methods 🙂🙏 #dotnet pic.twitter.com/XnUAnmOdQr
— Dan Clarke 🎙 (@dracan) July 19, 2022
C#: String.IsNullOrEmpty vs String.IsNullOrWhiteSpace
🌊 C#: String.IsNullOrEmpty vs String.IsNullOrWhiteSpace 🌊
— Davide Bellone 🐧 (@BelloneDavide) July 20, 2022
What happens to your validation if the user enters a string like " "? That string is made of white spaces, so it is not empty.
Consider using IsNullOrWhiteSpace when validating inputs!#csharp #dotnet pic.twitter.com/s7jSsjCHlh
#100DaysOfCode
— san (@santoshpoojari3) August 19, 2021
Csharp Best practice - Const pic.twitter.com/bESVIrbfR3
Next time you write Hello World! Do this,
Clean code always looks like it was written by someone who cares.”
― Robert C. Martin, Uncle Bob
C# Exception filters has been around since advent of C# 6.0 , I'm sure we rarely use it because we are so used to old way of using conditional exception handling.
Cut to the chase........!
Run dotnet in browser
https://try.dot.net/
Happy Coding!
![]()

Let’s try to understand with a simple example as shown in below.

In this case the string val, would be converted into integer without any error or exception; and that is what is intended with int.Parse() method.
The int.Prase() method throws three different types of exceptions depends on the data provided.
Incase of int.TryParse() method, when it converts the string representation of an number to an integer; it set the the out variable with the result integer and returns true if successfully parsed, otherwise false.

Keep in mind in case of int.TryParse(), in case there won’t be any exception. Either it is for null parameter, incorrect format or out of value integer. Everytime, the result value would be set to 0 and method would return false.

The Null-coalescing ,Null-conditional and Chaining C# Operators #csharp #programming #programmers #Coding #code #CodeNewbie #100DaysOfCode pic.twitter.com/G4rsiyVrFX
— San (@santoshpoojari3) April 19, 2020
C# Local Function -USE JUST ONCE#csharp #developers #Developer #100DaysOfCode #Coding #code #CodeNewbie #codes #programming #programmers #programmer pic.twitter.com/3wxYYhDmdg
— San (@santoshpoojari3) April 20, 2020
C# Array to compare ,SequenceEqual() and Reverse()— San (@santoshpoojari3) April 21, 2020
int[] arr1 = new int[] { 1,2,3};
int[] arr2 = new int[] { 3,2,1 };
Console.WriteLine(arr1.SequenceEqual(arr2)); // false
Console.WriteLine(arr1.Reverse().SequenceEqual(arr2)); // true#csharp #programming #programmers #code
TKey.T implements the IEquatableThis method performs a linear search; therefore, this method is an O(n) operation, where n is Count.
public T this[int index] { get; set; }
List accepts null as a valid value for reference types and allows duplicate elements.
This property provides the ability to access a specific element in the collection by using the following syntax: myCollection[index].
Retrieving the value of this property is an O(1) operation; setting the property is also an O(1) operation.
#csharp Short circuiting logic condition vs Non Short circuiting logic condition— San (@santoshpoojari3) April 19, 2020
Short Circuit : &&
Non Short Circuit : &
Short Circuit : ||
Non Short Circuit just : |#programming #programmer #Coding #100DaysOfCode #code #CodeNewbie pic.twitter.com/7lJQMQNTgB
public Customer GetByPhoneNumber(string phoneNumber)
{
return _customerRepository
.List(c => c.PhoneNumber == phoneNumber)
.FirstOrDefault();
}
var customer = GetByPhoneNumber(phone); //Why null check this break design principle int orderCount = customer != null ? customer.OrderCount : 0; decimal totalPurchase = customer != null ? customer.TotalPurchase : 0m;
public class Customer
{
public static Customer NotFound =
new Customer() { OrderCount=0, TotalSales=0m };
// other properties and behavior
}
var customer = GetByPhoneNumber(phone); int orderCount = customer.OrderCount ; decimal totalPurchase =customer.TotalPurchase;