博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
对于C#中使用变量的“位” 来代替不同的意思 类似于二进制
阅读量:4306 次
发布时间:2019-06-06

本文共 387 字,大约阅读时间需要 1 分钟。

自己做的panel 的描边  

然后再panel 中加入 int   outline 这个属性 

中超说   用   int 的每一位 代替不同的边   需要描边则为1   否则为0

然后设置

all

~0

left

1

top

2

bottom

4

right

8

这几个枚举值 

然后outline=选择的枚举值

然后在程序中 

outline & left  如果等于left  则表示left 边需要描边

 

 

记得之前有看到 c语言中用bit 关键字    来设定    今天查了一下 

这是位域  类似于结构体

struct bs
{int a:8;int b:2;int c:6;}data; 
说明data为bs变量,共占2个字节。其中位域a占8位,位域b占2位,位域c占6位  
 
 

 

转载于:https://www.cnblogs.com/jilodream/archive/2013/01/17/4222765.html

你可能感兴趣的文章
mongodb查询优化
查看>>
五步git操作搞定Github中fork的项目与原作者同步
查看>>
git 删除远程分支
查看>>
删远端分支报错remote refs do not exist或git: refusing to delete the current branch解决方法
查看>>
python multiprocessing遇到Can’t pickle instancemethod问题
查看>>
APP真机测试及发布
查看>>
通知机制 (Notifications)
查看>>
10 Things You Need To Know About Cocoa Auto Layout
查看>>
一个异步网络请求的坑:关于NSURLConnection和NSRunLoopCommonModes
查看>>
iOS 如何放大按钮点击热区
查看>>
ios设备唯一标识获取策略
查看>>
获取推送通知的DeviceToken
查看>>
Could not find a storyboard named 'Main' in bundle NSBundle
查看>>
CocoaPods安装和使用教程
查看>>
Beginning Auto Layout Tutorial
查看>>
block使用小结、在arc中使用block、如何防止循环引用
查看>>
iPhone开发学习笔记002——Xib设计UITableViewCell然后动态加载
查看>>
iOS开发中遇到的问题整理 (一)
查看>>
Swift code into Object-C 出现 ***-swift have not found this file 的问题
查看>>
为什么你的App介绍写得像一坨翔?
查看>>