C# VSCode with MAC practice #1

in #it7 years ago

Hi, I'm practicing the VSCODE with C#. This is nice effort to understand the processing.

You need the VSCODE
C# extension
.net core

Then ready to go.

When i'm doing the making console project and debugging,
There are some procedures that it requires.
I will be posting some of them that you can understand easilly

For now, i'm just posting the practice.



Item의 주소와 Contact의 주소를 같게 만듬 결국 하나를 바꾸면 다른 한개도 바뀜

When i have made the Item, I put the contact to the item. Then the output is the same as contact


Item은 이미 Contact형이 되어버림

Even if i try to change the item, contact will follow the item.

/////////// code is here

namespace abstactPractice
{
public class PdaItem
{
public virtual string Name { get; set; }
}

public class Contact : PdaItem
{
    public override string Name
    {
        get
        {
            return FirstName + " " + LastName;
        }
        set
        {
            string[] names = value.Split(' ');
            FirstName = names[0];
            LastName = names[1];
        }
    }

    public string FirstName { get; set; }
    public string LastName { get; set; }
}

}

/////////////////////

This is interesting to see directly in debugger, To understand it and make it yourself
It will be the good example.

Thank you

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.034
BTC 91785.29
ETH 3117.82
USDT 1.00
SBD 3.00