reviewer

Reviewer

View the Project on GitHub

Navigation: Index Azure .NET SQL React General

.NET

CLI and CLR

EF, LINQ, and ADO.NET

Extension Method

Extension methods allow you to add methods to existing types without modifying them. To create an extension method:

public static class StringExtensions
{
    public static bool IsNullOrEmpty(this string str)
    {
        return string.IsNullOrEmpty(str);
    }
}

Dependency Injection

Dependency Injection (DI) is a design pattern used to implement IoC (Inversion of Control), allowing the creation of dependent objects outside of a class and providing those objects to a class in various ways. Example:

public interface IService { }
public class Service : IService { }
public class Client
{
    private readonly IService _service;
    public Client(IService service)
    {
        _service = service;
    }
}

Generics

Generics allow you to define a class or method with a placeholder for the type of data it stores or uses. Example:

public class GenericClass<T>
{
    public T Data { get; set; }
}

Derived Class

A derived class is a class that inherits from another class. You can identify it by the : symbol. Example:

public class BaseClass { }
public class DerivedClass : BaseClass { }

async and await

Async and await are used for asynchronous programming. Example:

public async Task<int> GetDataAsync()
{
    await Task.Delay(1000);
    return 42;
}

virtual

The virtual keyword is used to modify a method, property, indexer, or event declaration and allow it to be overridden in a derived class. Example:

public class BaseClass
{
    public virtual void Display() { }
}
public class DerivedClass : BaseClass
{
    public override void Display() { }
}

Authorization and Authentication

Abstraction

Abstraction involves hiding the complex implementation details and showing only the necessary features of an object.

sealed Class

A sealed class cannot be inherited. Example:

public sealed class SealedClass { }

class and struct

abstract Class and interface

Task and Thread

const and readonly

Access Modifier

Access modifiers define the visibility of a class and its members. Examples include public, private, protected, and internal.

IEnumerable, ICollection, IList, and IQueryable

yield

The yield keyword is used to return each element one at a time in an iterator method. Example:

public IEnumerable<int> GetNumbers()
{
    yield return 1;
    yield return 2;
    yield return 3;
}

static Class and Regular Class

Constructor

A constructor is a special method that initializes an object. Types include default, parameterized, and static constructors.

Destructor

A destructor is a method that is called when an object is destroyed. It is used to release unmanaged resources.

Garbage Collector

The garbage collector automatically manages memory by reclaiming memory occupied by objects that are no longer in use.

Method overriding and overloading

delegate

A delegate is a type that represents references to methods with a specific parameter list and return type. Example:

public delegate void MyDelegate(string message);

Boxing and Unboxing

Managed and Unmanaged

Unit Test

Unit tests are automated tests that verify the correctness of a small piece of code. Frameworks include MSTest, NUnit, and xUnit.

Middleware

Middleware are components that are used to handle requests and responses in an ASP.NET Core application pipeline.

DTO and POCO


← Azure | Back to Index | SQL →