![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
文章平均质量分 77
BackkomCoder
改变!改变!!改变!!!
展开
-
C# 秒转为时:分:秒格式
string GetTime(float time){ float h = Mathf.FloorToInt(time / 3600f); float m = Mathf.FloorToInt(time / 60f - h * 60f); float s = Mathf.FloorToInt(time - m * 60f - h * 3600f); return...原创 2019-11-04 13:00:31 · 433 阅读 · 0 评论 -
C# DateTime类详解
1.获取时间只需要使用System命名空间下的DateTime类即可完成 Debug.Log(System.DateTime.Now); // 当前本地时间 (年月日时分秒) -- 10/4/2018 9:38:19 PM Debug.Log(System.DateTime.UtcNow); // 当前世界时间 (年月日时分秒)...原创 2019-11-03 15:13:21 · 17102 阅读 · 1 评论 -
C# Array、ArrayList和List的区别
ArrayArray 类是 C# 中所有数组的基类,它是在 System 命名空间中定义。Array 类提供了各种用于数组的属性和方法。属性如: IsReadOnly数组只读。Length数组长度。方法常用的如下:1 Clear根据元素的类型,设置数组中某个范围的元素为零、为 false 或者为 null。2 Copy(Array, Array, Int32)从数组的第...原创 2019-11-03 15:12:24 · 919 阅读 · 0 评论 -
基于C#的单例模板类
using UnityEngine;using System.Collections;namespace Singleton{ /// <summary> /// Persistent manager - a singleton component, that will not /// be destroyed between levels. //...原创 2018-08-13 14:34:12 · 1911 阅读 · 0 评论 -
基于C#的MD5加密
using System.Security.Cryptography;using System.Text;using UnityEngine;public class MD5Encrypt : MonoBehaviour{ // Use this for initialization void Start() { Debug.Log(MD5Encr...原创 2018-08-13 14:16:26 · 185 阅读 · 0 评论 -
基于C#的异步Socket程序(TCP)
今天我门将通过一个多人聊天的例子来说明异步Socket程序。原创 2017-12-03 19:58:09 · 1135 阅读 · 0 评论 -
基于C#的同步Socket程序(TCP)
我们来编写一套简单的网络程序,这套网络程序分为客户端和服务端俩部分,客户端发送一行文本给服务器,服务器收到后将文本稍作改动后发回给客户端。原创 2017-12-02 17:10:39 · 778 阅读 · 0 评论