เมธอด Byte.GetTypeCode() ใน C# ใช้สำหรับคืนค่า TypeCode สำหรับประเภทค่า Byte
ไวยากรณ์
ไวยากรณ์มีดังนี้:
public TypeCode GetTypeCode ();
ตัวอย่าง
ตัวอย่างการใช้งานเมธอด Byte.GetTypeCode():
using System;
public class Demo {
public static void Main(){
byte val1 = 50;
TypeCode type = val1.GetTypeCode();
Console.WriteLine("TypeCode = " + type);
}
}
ผลลัพธ์
โค้ดจะแสดงผลดังนี้:
TypeCode = Byte