10 Replies - 843 Views - Last Post: 28 January 2016 - 08:38 AM Rate Topic: -----

#1 digituser   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 73
  • Joined: 09-August 15

How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 06:52 AM

How to set the value in object data type in vb.net. Actually the property is object data type .i want to access the Property
Public Overrides Property MinValue As Object 


)

    Dim yaxisfloat As  new LinearYAxisFloat()
     yaxisfloat.MinValue = 20 ------------------// it showing error like ( Specified cast is not valid ) 




see the class in the website
http://beemobile4.ne...d4b8236a5f6.htm

Is This A Good Question/Topic? 0
  • +

Replies To: How to set the value in object data type variable in vb.net

#2 TechnoBear   User is offline

  • Lady A
  • member icon

Reputation: 472
  • View blog
  • Posts: 1,435
  • Joined: 02-November 11

Re: How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 07:13 AM

Why not set the property as Integer? Is there a reason you have it as Object?

Edit:
Didn't see the link and didn't assume this was third party.

Do they have documentation on why the made a variable that looks like it should be Int an Object?

This post has been edited by TechnoBear: 28 January 2016 - 07:16 AM

Was This Post Helpful? 0
  • +
  • -

#3 TechnoBear   User is offline

  • Lady A
  • member icon

Reputation: 472
  • View blog
  • Posts: 1,435
  • Joined: 02-November 11

Re: How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 07:18 AM

Okay, So what is this control? A little google-fu turns up something about a DatePicker, any chance the MinValue is a Date?
Was This Post Helpful? 0
  • +
  • -

#4 digituser   User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 73
  • Joined: 09-August 15

Re: How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 07:19 AM

hi,TechnoBear. Did you see the website ? ... I'm using the beeMobile controller.so that porperty already made by the controller. just i want to access the property ..
Was This Post Helpful? 0
  • +
  • -

#5 TechnoBear   User is offline

  • Lady A
  • member icon

Reputation: 472
  • View blog
  • Posts: 1,435
  • Joined: 02-November 11

Re: How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 07:24 AM

I did and i revised my answer because of it. I am unsure what kind of control the beemobile controller is.

What kind of value would it be expecting? Why a generic Object Type? What does it do with this MinValue?
Was This Post Helpful? 0
  • +
  • -

#6 0Pain0Gain   User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 116
  • Joined: 15-December 15

Re: How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 07:48 AM

Having a look on thebee forums and on google the posts have its use like below

.minvalue = 20F


Not sure what the F is, there documentation is very vague.

I have to do some line charts but I think ill use something else than Bee :)/>

hope this helps

Update: I found some more info that uses this

.minvalue = 200,10

This post has been edited by 0Pain0Gain: 28 January 2016 - 07:50 AM

Was This Post Helpful? 1
  • +
  • -

#7 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6829
  • View blog
  • Posts: 28,311
  • Joined: 12-December 12

Re: How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 07:52 AM

The F is a literal type character signifying a value of type single.
Was This Post Helpful? 0
  • +
  • -

#8 TechnoBear   User is offline

  • Lady A
  • member icon

Reputation: 472
  • View blog
  • Posts: 1,435
  • Joined: 02-November 11

Re: How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 07:53 AM

Quote

Not sure what the F is, there documentation is very vague


The F makes it a Single, I would be Integer, and D double

That kind of makes sense but they really shouldn't have it as an Object at all.

Quote

Update: I found some more info that uses this

.minvalue = 200,10


This just confuses me...
Was This Post Helpful? 0
  • +
  • -

#9 andrewsw   User is offline

  • never lube your breaks
  • member icon

Reputation: 6829
  • View blog
  • Posts: 28,311
  • Joined: 12-December 12

Re: How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 07:56 AM

I assume that 200,10 is really 200.10 but with a culture that uses the comma as decimal separator.
Was This Post Helpful? 1
  • +
  • -

#10 0Pain0Gain   User is offline

  • D.I.C Head

Reputation: 21
  • View blog
  • Posts: 116
  • Joined: 15-December 15

Re: How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 08:21 AM

I read the "," as a co-ordinate as its for a line graph, but a decimal also makes sense.

Hopefully the OP can let us know if any of these are working.
Was This Post Helpful? 0
  • +
  • -

#11 TechnoBear   User is offline

  • Lady A
  • member icon

Reputation: 472
  • View blog
  • Posts: 1,435
  • Joined: 02-November 11

Re: How to set the value in object data type variable in vb.net

Posted 28 January 2016 - 08:38 AM

View Post0Pain0Gain, on 28 January 2016 - 09:21 AM, said:

I read the "," as a co-ordinate as its for a line graph, but a decimal also makes sense.


I read it the same way... hence why i got confused by it :)

I think the literals approach would work, I had forgotten about literals as I don't think they've come in to play for me since school
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1