在一行写一个属性 [英] Write a property on one line

查看:79
本文介绍了在一行写一个属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想在一行中写这个;我如何实现它?


公共财产x1()作为整数


获取


返回_x1


结束获取


设置(ByVal值为整数)


_x1 =值


结束套件


结束物业


/ k

If I want to write this in one line; how do I achieve it?

Public Property x1() As Integer

Get

Return _x1

End Get

Set(ByVal Value As Integer)

_x1 = Value

End Set

End Property

/k

推荐答案

" kurt sune" < ap*@apa.cx> schrieb:
"kurt sune" <ap*@apa.cx> schrieb:
如果我想在一行中写这个;我该如何实现呢?
If I want to write this in one line; how do I achieve it?




不支持。


-

MS Herfried K. Wagner

MVP< URL:http://dotnet.mvps.org/>

VB< URL:http:// dotnet。 mvps.org/dotnet/faqs/>



That''s not supported.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Kurt,


您可以创建一个C#类并使用它而不是你的项目。


一些人发现VB语言的坏处是VBCrLf有一个与C语言相同的含义。 ;"


我更喜欢每次输入;>


只是我的想法,


Cor
Kurt,

You can create a C# class and use that than in your project.

One of by some found bad things of VB languages is that the VBCrLf has a
kind of same meaning as in C languages the " ;"

I prefer it by the way over everytime typing the ";"

Just my thought,

Cor


我好奇,因为我从未见过_x1。看起来好像你有一个整数数组的尺寸x1。属性x1()返回什么?

非常感谢你能帮助我理解这一点的任何帮助。谢谢。


" kurt sune"写道:
I''m curious because I''ve never seen the _x1. It appears as if you have
dimensioned x1 as an array of integers. What does the property x1() return?
Would appreciate any help you can give me to understand this. Thanks.

"kurt sune" wrote:
如果我想在一行中写这个;我如何实现它?

公共财产x1()作为整数

获取

返回_x1

结束获取

设置(ByVal值为整数)

_x1 =价值

结束集

结束财产

/ k
If I want to write this in one line; how do I achieve it?

Public Property x1() As Integer

Get

Return _x1

End Get

Set(ByVal Value As Integer)

_x1 = Value

End Set

End Property

/k



这篇关于在一行写一个属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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