Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27415

VS 2012 SetProperty function.

$
0
0
Hello everyone.

I'd like to do something, a function called SetProperty. This function will set the property you give it to to the value you set it to.
For example, a class full of properties, like haha1 As Integer, haha2 As Boolean, haha3 As Byte, etc. And you would use the function like:

SetProperty("haha1", 13)
SetProperty("haha2", True)

How would I start on doing that? Thanks.

EDIT: One more question I have no idea how it's done in VB.net. In javascript you'd do:

var stage2Rects = Array(Rectangle(-755,-132,4,218),Rectangle(-721,-340,4,166),Rectangle(-586,-326,4,150),Rectangle(-483,-181,4,222));

for (var y = 0; y < curArray.length; y++) {

if (curArray[y].contains(party.get(i).getPosition())) {

getPosition represents the X and Y of the "party" property.
And thne, in returns true if it's within the rectangle. How would I do it in vb.net? o.O

Viewing all articles
Browse latest Browse all 27415

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>