// cs_operator_bitwise_OR.cs
using System;
class Test
{
public static void Main()
{
Console.WriteLine(true ^ false); // logical exclusive-or
Console.WriteLine(false ^ false); // logical exclusive-or
Console.WriteLine("0x{0:x}", 0xf8 ^ 0x3f); // bitwise exclusive-or
}
}
using System;
class Test
{
public static void Main()
{
Console.WriteLine(true ^ false); // logical exclusive-or
Console.WriteLine(false ^ false); // logical exclusive-or
Console.WriteLine("0x{0:x}", 0xf8 ^ 0x3f); // bitwise exclusive-or
}
}
解决方案 »
- C# 自己写timer控件的问题
- winfrom窗体如何判断消息的来源
- 安装包快捷桌面和更新问题
- System.String类的初始化
- 这个是什么控件?
- 大家做开发用的哪些报表?
- 新手:HttpCookie c = new HttpCookie("User")中c和user分别是什么意思?
- .dll问题?
- 救命:为什么this.DataGrid1.DataSource = this.sqlSelectCommand1.ExecuteReader()不能显示我查询的结果? 第一个解决拿分
- 100分求一个问题,急!!在线等待!!!
- 如何实现在 listview 中显示 treeview 中当前节点的下级节点?
- 各位大侠,问一下水晶报表?谢谢
ComStat结构
typedef struct _COMSTAT
{
DWORD fCtsHold :1;
DWORD fDsrHold :1;
DWORD fRlsdHold :1;
DWORD fXoffHold :1;
DWORD fXoffSent :1;
DWORD fEof :1;
DWORD fTxim :1;
DWORD fReserved :25;
DWORD cbInQue;
DWORD cbOutQue;
}
COMSTAT, *LPCOMSTAT;
在c#中可以如下声明public enum ComStatFlags
{
fCtsHold = 0x1,
fDsrHold = 0x2,
fRlsdHold = 0x4,
fXoffHold = 0x8,
fXoffSent = 0x10,
fEof = 0x20,
fTxim = 0x40
}[StructLayout(LayoutKind.Sequential)]
public struct COMSTAT
{
public ComStatFlags flag;
public int cbInQue;
public int cbOutQue;
}