C# VSCode with MAC practice #1

in #it6 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.19
TRX 0.14
JST 0.029
BTC 67015.44
ETH 3247.79
USDT 1.00
SBD 2.64