本文介绍了VB6到VB.NET属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
VB.NET中的代码是什么?
以下VB6代码属性,
what will be the code in VB.NET
for the below VB6 code property,
Public Property let WorkbookLocked(pLocked As Boolean)
cboWorbookSelection.Locked = pLocked
lWorkBookLocked = pLocked
End Property
Public Property Get WorkbookLocked() As Boolean
WorkbookLocked = cboWorbookSelection.Locked
End Property
推荐答案
Private _WorkbookLocked As Boolean
Public Property WorkbookLocked() As Boolean
Get
Return _WorkbookLocked
End Get
Set(ByVal value As Boolean)
_WorkbookLocked = value
End Set
End Property
我没有输入您的所有代码已经
最简单的方法s(取决于您拥有的VS版本)是键入公共属性
然后点击Tab键。将生成一个代码片段,其中包含您要填写的字段(名称,类型)
I haven''t put in all the code that you had
Easiest way to do this (depending on which version of VS you have) is to type public property
and then hit the tab key. A code snippet will be generated with fields for you to fill in (Name, Type)
这篇关于VB6到VB.NET属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!