byte data = 0x41;
System.Console.WriteLine((char)data); // A
byte[] data = new byte[2];
data[0] = 0x41;
data[1] = 0x42;
foreach (byte item in data)
{
System.Console.WriteLine((char)item); // A B
}
// public class SubCommands
Type subCommandClass = typeof(SubCommands);
MethodInfo? subCommand = subCommandClass.GetMethod(CapitalizeFirstLetter(firstArgument));
// namespace は省略可
Type subCommandClass = Type.GetType("<namespace>.SubCommands");
MethodInfo? subCommand = subCommandClass.GetMethod(CapitalizeFirstLetter(firstArgument));
// public class SubCommands
SubCommands sc = new SubCommands();
Type subCommandClassInstance = sc.GetType();
MethodInfo? subCommand = subCommandClassInstance.GetMethod(CapitalizeFirstLetter(firstArgument));
引数を渡す
// Get the ItsMagic method and invoke with a parameter value of 100
MethodInfo magicMethod = magicType.GetMethod("ItsMagic");
object magicValue = magicMethod.Invoke(magicClassObject, new object[]{100});
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Microsoft RLC Report Designer について\n", | |
"\n", | |
"## インストール\n", | |
"\n", | |
"格闘機能として提供されているので、RDLC を検索して、拡張機能からダウンロード" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3.8.8 ('base')", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"name": "python", | |
"version": "3.8.8" | |
}, | |
"orig_nbformat": 4, | |
"vscode": { | |
"interpreter": { | |
"hash": "fc36fc9f8ee1a121e4202a259c0a0605dd93c4708658b4bb406dd11ab47a5df5" | |
} | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
var sw = new Stopwatch();
sw.Start();
for (int i = 0; i < 1000; i++)
{
Thread.Sleep(1);
}
sw.Stop();
long milliSec = sw.ElapsedMilliseconds;
System.Console.WriteLine($"{milliSec} ms"); // 1163
long ticks = sw.ElapsedTicks;
System.Console.WriteLine($"{ticks} ticks"); // 11557911
他に、restart メソッドとか使いそう。