Horje
c# base vs this Code Example
c# base vs this
// The 'this' keyword represents the current class instance.
// While 'base' access's a method on the parent.

// Example of usage:
public class Parent
{
    public virtual void Foo() {}
}

public class Child : Parent // Derive from 'Parent' class
{
    public override void Foo()
    { base.Foo(); } // call the virtual method on 'Parent'

	// The override is basically not doing anything in this case, since we do
	// exactly the same thig as in the parent method (which in this case is nothing).
}




Csharp

Related
belgium 251 PRG Prac Code Example belgium 251 PRG Prac Code Example
wpf keydown detect if control key is down Code Example wpf keydown detect if control key is down Code Example
.net return context.Result without extra new objectResult Code Example .net return context.Result without extra new objectResult Code Example
access server name or ip c# get Code Example access server name or ip c# get Code Example
.net core 3 entity framework constraint code first image field Code Example .net core 3 entity framework constraint code first image field Code Example

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