Horje
C# if with obj params Code Example
C# if with obj params
object obj = new Person
{
    FirstName = "Kathleen",
    LastName = "Dollard",
    Address = new Address { City = "Seattle" }
};

if (obj is Person { Address: { City: "Seattle" } })
    Console.WriteLine("Seattle");

if (obj is Person { Address.City: "Seattle" }) // Extended property pattern
    Console.WriteLine("Seattle");




Csharp

Related
calculator using single readline c# Code Example calculator using single readline c# Code Example
unity navmeshagent set destination Code Example unity navmeshagent set destination Code Example
add two large numbers Code Example add two large numbers Code Example
how to change argument of function in f# Code Example how to change argument of function in f# Code Example
c# register write value Code Example c# register write value Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8