注意使用C#语言在注册表中进行的工作.网络工作方式 [英] Note the work to be in your registry by the language C #. Net How to work

查看:56
本文介绍了注意使用C#语言在注册表中进行的工作.网络工作方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望兄弟会程序员尽可能向奥斯曼回答Bsra问题.
第一个问题:
Sarirenmbr是该项目的设计方案,旨在运行一个试点程序,然后在30天后破坏了用户的Alsarirenmbr请求.有两种方式
1-通过减少在计算机中安装时间的天数
2-通过时间和日期
非常感谢和赞赏

注意使用C#语言在注册表中进行的工作. Net

I hope that brotherhood programmers to answer question No. Bsra as possible to Osmanm
First question:
Sarirenmbr is how the project is designed to operate a pilot program and then after 30 days undermines Alsarirenmbr request from the user. In two ways which
1 - by declining in the days of the time of installation in the computer
2 - through the time and date
Thank you very much and appreciation

Note the work to be in your registry by the language C #. Net

推荐答案

Herez,示例代码读取,递增,然后将DWORD值写入HKEY_CURRENT_USER:

Herez the sample code reads, increments, and then writes a DWORD value to HKEY_CURRENT_USER:

Imports Microsoft.Win32
Dim regVersion As RegistryKey
regVersion =
Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\TestApp\\1.0", True)
If regVersion Is Nothing Then
    ' Key doesn't exist; create it.
    regVersion =
Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\TestApp\\1.0")
End If

Dim intVersion As Integer = 0
If (Not regVersion Is Nothing) Then
    intVersion = regVersion.GetValue("Version", 0)
    intVersion = intVersion + 1
    regVersion.SetValue("Version", intVersion)
    regVersion.Close()
End If


这篇关于注意使用C#语言在注册表中进行的工作.网络工作方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆