avatar
Articles
317
Tags
187
Categories
21
Home
Archieves
Tags
Categories
BIM
Devs
Link
About
Broccoli's DevHow to Compare Version Numbers in C# Back to Home
Search
Home
Archieves
Tags
Categories
BIM
Devs
Link
About

How to Compare Version Numbers in C#

Created2020-05-25|Updated2026-01-07|devcsharp
|Post Views:
中文

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
Link: https://xlx.dev/dev/csharp/csharp-compare-version/csharp-compare-version.en/
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
csharpversion
cover of previous post
Previous
c#如何比较版本号的大小
参照文章:C# 如何比较版本号大小在c#中有version类可以进行版本号的比较
cover of next post
Next
Mysql Assign User to Access Specific Database
Today, using a new user to access the mysql of the cloud server, I found that an error was reported and I could only access the infomation_schema database. Following the method on the blog to enter the command grant all privileges on test_db.* to testuser@localhost identified by "123456", mysql kept reporting errors.I have been following the blog to grant permissions but it reports errors. I feel it should be due to version inconsistency causing command changes.Sure enough, I found ...
Related Articles
cover
2020-05-25
c#如何比较版本号的大小
参照文章:C# 如何比较版本号大小在c#中有version类可以进行版本号的比较
cover
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"/> <...
cover
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...
cover
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...
cover
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...
cover
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...
avatar
Broccoli
xlx.dev
Articles
317
Tags
187
Categories
21
Announcement
欢迎访问!右上角可切换中英文。感谢您的阅读!
Recent Posts
Quickly Migrate Blog Using YingDao
Quickly Migrate Blog Using YingDao2026-01-07
使用影刀快速迁移博客
使用影刀快速迁移博客2026-01-07
LLaMA-Factory Gradio Environment Configuration
LLaMA-Factory Gradio Environment Configuration2026-01-04
LLaMA-Factory Gradio 环境配置
LLaMA-Factory Gradio 环境配置2026-01-04
SSH Remote Connection Issues in VS Code
SSH Remote Connection Issues in VS Code2026-01-04
© 2025 - 2026 By BroccoliFramework Hexo 8.1.1|Theme Butterfly 5.5.2
Search
Loading Database