Visual Studio 开发环境安装与配置

0001开发环境全屏显示

在菜单栏中选择“视图”|“全屏显示”选项

快捷键:Shift+Alt+Enter

0002为数据库创建缓存依赖

2011022416282685.png

002 为程序设置版本和帮助信息

 

 
  
// 有关程序集的常规信息通过下列属性集
// 控制。更改这些属性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle( " 为程序设置版本和帮助信息 " )]
[assembly: AssemblyDescription(
"" )]
[assembly: AssemblyConfiguration(
"" )]
[assembly: AssemblyCompany(
" 明日科技 " )]
[assembly: AssemblyProduct(
" 为程序设置版本和帮助信息 " )]
[assembly: AssemblyCopyright(
" 版权所有 (C) 2007 " )]
[assembly: AssemblyTrademark(
"" )]
[assembly: AssemblyCulture(
"" )]

// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 属性设置为 true。
[assembly: ComVisible( false )]

// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid( " b3b24675-e445-4bce-a015-a8e43ec3187d " )]

// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 内部版本号
// 修订号
//
[assembly: AssemblyVersion( " 1.0.0.0 " )]
[assembly: AssemblyFileVersion(
" 1.0.0.0 " )]

0003巧用^=运算符

通过异或赋值运算可以完成对数字的简单加密功能,其基本原理是对数字进行按位异或运算。

ContractedBlock.gif ExpandedBlockStart.gif View Code
 
   
private void button1_Click( object sender, EventArgs e)
{
char [] strOld = this .textBox1.Text.ToCharArray();
char [] strHy = this .textBox3.Text.ToCharArray();
for ( int i = 0 ; i < strOld.Length; i ++ )
{
if ( ! Char.IsNumber(strOld[i]))
{
MessageBox.Show(
" 请输入数字 " );
this .textBox1.Focus();
this .textBox1.SelectAll();
return ;
}
}
for ( int i = 0 ; i < strHy.Length; i ++ )
{
if ( ! Char.IsNumber(strHy[i]))
{
MessageBox.Show(
" 请输入数字 " );
this .textBox3.Focus();
this .textBox3.SelectAll();
return ;
}
}
int b = int .Parse( this .textBox1.Text.ToString());
int t = int .Parse( this .textBox3.Text.ToString());
int Z = b ^ t;
this .textBox2.Text = Z.ToString();
}

转载于:https://www.cnblogs.com/sjllef/archive/2011/02/24/1963853.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值