C# 实现保留两位小数的方法

摘要: 1、Math.Round(0.333333,2);//按照四舍五入的国际标准 2、double dbdata=0.335333; string str1=String.Format("{0:F}",dbdata);//默认为保留两位 3、float i=0.333333; int j=(int)(i 阅读全文
posted @ 2019-05-17 00:43 援手 阅读(27321) 评论(2) 推荐(1) 编辑

在vs中安装和引用科学计算库 Math.NET Numerics

摘要: 在vs中安装和引用科学计算库 Math.NET Numerics1.没网的情况下 首先安装最新的NuGet Tools,然后在https://www.nuget.org/ 中找到MathNet.Numerics的安装包,例如下载到包则使用指令安装 Install-Package MathNet.Nu 阅读全文
posted @ 2019-05-16 23:59 援手 阅读(1674) 评论(0) 推荐(0) 编辑

C# 特性(Attribute)

摘要: .net 框架定义了三种预定义特性(Attribute) 1、AttributeUsage 预定义特性 AttributeUsage 描述了如何使用一个自定义特性类。它规定了特性可应用到的项目的类型。 2、Conditional 这个预定义特性标记了一个条件方法,其执行依赖于指定的预处理标识符。 它 阅读全文
posted @ 2019-05-04 10:43 援手 阅读(247) 评论(0) 推荐(0) 编辑

Modbus测试工具ModbusPoll与Modbus Slave使用方法

摘要: 一、介绍 一、介绍 一、介绍 一、介绍 Modbus Poll :Modbus主机仿真器,用于测试和调试Modbus从设备。该软件支持ModbusRTU、ASCII、TCP/IP。用来帮助开发人员测试Modbus从设备,或者其它Modbus协议的测试和仿真。它支持多文档接口,即,可以同时监视多个从设 阅读全文
posted @ 2019-04-30 23:39 援手 阅读(2349) 评论(0) 推荐(0) 编辑

StarUML3.0学习笔记

摘要: StarUML(简称SU),是一种创建UML类图,生成类图和其他类型的统一建模语言(UML)图表的工具。StarUML是一个开源项目之一发展快、灵活、可扩展性强(zj). 目前最新版本已经升级到Current version is v3.1.0 阅读全文
posted @ 2019-04-30 23:33 援手 阅读(331) 评论(0) 推荐(0) 编辑

转载:接近开关NPN型与PNP型的相互代替

摘要: 首先了解一下它们的工作原理: 简介:PNP与NPN型传感器其实就是利用三极管的饱和和截止,输出两种状态,属于开关型传感器。但输出信号是截然相反的,即高电平和低电平。NPN输出是低电平0,PNP输出的是高电平1。PNP与NPN型传感器一般有三条引出线,即电源线VCC、0V线,out信号输出线。 种类: 阅读全文
posted @ 2019-04-12 05:36 援手 阅读(4739) 评论(1) 推荐(0) 编辑

C#中(int)、int.Parse()、int.TryParse()和Convert.ToInt32()的区别

摘要: C#中(int)、int.Parse()、int.TryParse()和Convert.ToInt32()的区别 在编程过程中,数据转换是经常要用到的,C#中数据转换的方法很多,拿将目标对象转换为整型(int)来讲,有四种方法:分别为(int)、int.Parse()、int.TryParse()和 阅读全文
posted @ 2019-04-06 00:41 援手 阅读(174) 评论(0) 推荐(0) 编辑

DateTime.ToString() Patterns

摘要: DateTime.ToString() Patterns All the patterns: The patterns for DateTime.ToString ( 'd' ) : The patterns for DateTime.ToString ( 'D' ) : The patterns 阅读全文
posted @ 2019-04-06 00:34 援手 阅读(181) 评论(0) 推荐(0) 编辑

_056_根据年份判断十二生肖

摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System 阅读全文
posted @ 2019-04-05 23:54 援手 阅读(425) 评论(0) 推荐(0) 编辑

构造函数

摘要: using System; namespace ConsoleApp6 { using System; namespace tutorialspoint { public class Student { //public Student() { } //构造函数,即便此处不写此函数,系统也... 阅读全文
posted @ 2019-03-12 22:59 援手 阅读(110) 评论(0) 推荐(0) 编辑