Reference Article: C# How to compare version numbers
In C#, there is a Version class that can be used to compare version numbers.
Author: Broccoli
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles
2020-05-25
c#如何比较版本号的大小
参照文章:C# 如何比较版本号大小在c#中有version类可以进行版本号的比较

2020-05-27
C# Software Auto-update via Database
Idea I read many blogs using local and server XML documents for updates, so I wondered if this could be done using a database.The basic idea is consistent with the general way. There will be a local XML file recording version number, update time, and local software address info. xml1234567891011<?xml version="1.0" encoding="utf-8" ?><AutoUpDater> <URLAdres url =""/> <UpdateInfo> <UpdateTime Date="2020-05-20"/> <...

2020-05-27
C#通过数据库进行软件的自动更新
思路 看了许多博客是利用本地和服务器的xml文档进行更新,便想着能不能用数据库完成这个操作基本思路与一般的方式一直,本地会有一个xml文件里面记录版本号更新时间软件本地地址信息 xml1234567891011<?xml version="1.0" encoding="utf-8" ?><AutoUpDater> <URLAdres url =""/> <UpdateInfo> <UpdateTime Date="2020-05-20"/> <Version Num="1.0.1"/> </UpdateInfo> <FilePath> <Path Str="E:\Visual Studio 2019 Project\ConsoleApp\ConsoleApp"/> </FilePath></AutoUpDat...
2020-08-26
Get Enum Value and DescriptionAttribute from String
Get Enum Value from String1var em = (ChooseEnum) Enum.Parse( typeof(ChooseEnum), desc); Get DescriptionAttribute from Enum Value12345678910111213141516171819public static string ConvertToSql(Enum value) { Type enumType = value.GetType(); string name = Enum.GetName(enumType, value); if (name != null) { FieldInfo fieldInfo = enumType.GetField(name); if (fieldInfo != null) { D...
2020-08-26
根据字符串获得相应枚举值和DescriptionAttribute
根据字符串获得枚举值1var em = (ChooseEnum) Enum.Parse( typeof(ChooseEnum), desc); 根据枚举值获得DescriptionAttribute12345678910111213141516171819public static string ConvertToSql(Enum value) { Type enumType = value.GetType(); string name = Enum.GetName(enumType, value); if (name != null) { FieldInfo fieldInfo = enumType.GetField(name); if (fieldInfo != null) { DescriptionAttribute attribute...
2020-01-19
Issue where modifying List A also modifies List B
Reference ArticleToday, while programming, I performed list conversion and simultaneously deleted items from the converted list. 12List<XYZ> A = firList; A.RemoveAt(0); I found that after deleting from A, the firList was also deleted.The specific reason hasn’t been investigated clearly yet. I assume it’s because of memory usage, causing both lists to operate simultaneously. The exact reason is not verified, leaving a note to update later. 123List<XYZ> newFirList = n...
Announcement
欢迎访问!右上角可切换中英文。感谢您的阅读!

