#100DaysOfCode
— san (@santoshpoojari3) August 19, 2021
Csharp Best practice - Const pic.twitter.com/bESVIrbfR3
Wednesday, August 18, 2021
Best Practice Csharp Use NameOf for Constant
Productivity Tool MSBUILDLog and Project
Download https://msbuildlog.com/
Visual Studio Build Log Extension
Tools to make working with the Visual Studio project system for C#, Visual Basic, and F# easier. This extension is for VS2017 and VS2019. Search the extension marketplace if you require a different version. Build loggingA tool window is added under See the docs for more information. |
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProjectSystemTools
Monday, August 16, 2021
Hello world Csharp
Next time you write Hello World! Do this,
using static System.Console;
public class Program {
static void main() => WriteLine("Hello World");
}
Csharp Interface with same method implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
I1 ia = new C(); | |
ia.Method1(); | |
I2 ib = new C(); | |
ib.Method1(); | |
} | |
public class C: I1, I2 | |
{ | |
void I1.Method1() | |
{ | |
Console.WriteLine("Hello"); | |
} | |
void I2.Method1() | |
{ | |
Console.WriteLine("Bye"); | |
} | |
} | |
public interface I1 | |
{ | |
void Method1(); | |
} | |
public interface I2 | |
{ | |
void Method1(); | |
} | |
} |
Subscribe to:
Posts
(
Atom
)