thisキーワードのサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <Summary> | |
/// thisキーワードの確認を行うクラスです。 | |
/// </Summary> | |
public class ThisTest : MonoBehaviour | |
{ | |
public int fieldId; | |
public string fieldName; | |
/// <Summary> | |
/// 引数の値をフィールドにセットします。 | |
/// </Summary> | |
public void SetFieldValue(int fieldId, string fieldName) | |
{ | |
this.fieldId = fieldId; | |
this.fieldName = fieldName; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment