我有两个 .cs 文件(Hex2Bin.cs
和Program.cs
),我想将变量end_addr
从Program.cs
Hex2Bin.cs
我在 Program.cs 中的代码:
class Program
{
enum to_exit {
exit_ok = 0,
exit_invalid_args,
exit_to_few_args,
exit_invalid_input_file,
exit_invalid_args_file,
exit_permission_denied,
exit_unexpected_eof
};
// class value holders
static String args_file_name = "";
static String in_u1_name = "";
static String in_u22_name = "";
static String out_name = "";
static short end_addr = 0x0000; // 4-digit Hexadecimal end address
static Byte[] version_code = { 0, 0, 0, 0 }; // 3 bytes version, 1 for extra info
}
无论如何我可以做到这一点吗?我知道如何在 c 中做到这一点,但我对 c# 很陌生。谢谢。