473,386 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

object conversion w/ option strict on

I'm using a 3rd party dll to retrieve some data (I have no choice in this!),
this returns an Object variable that I know contains an array of singles. The
following code works fine if I set option strict to off, but with it on I get
the error:
Option Strict On disallows implicit conversions from 'System.Object' to
'1-dimensional array of Single'.

Dim myValues As Object
Dim mySngArr() As Single

' code to retrieve myValues goes here
mySngArr = myValues ' this line gives the error w/ option strict on

My question is: how can I create the array of singles from this object with
option strict on?

--

Thanks, Jerry

Jul 21 '05 #1
0 1113

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JerryH | last post by:
I'm using a 3rd party dll to retrieve some data (I have no choice in this!), this returns an Object variable that I know contains an array of singles. The following code works fine if I set option...
4
by: Nikhil Patel | last post by:
Hi all, I am a VB6 programmer and learning C#. I am currently reading a chapter on types. I have question regarding enums. Why do we need to convert enum members to the value that they represent?...
1
by: m830266 | last post by:
I'm trying to use the APAX serial I/O control (www.turbocontrol.com/AProZilla.htm) in a VB.NET project and I'm having trouble with its 'data received' events. The data is supplied by APAX as a...
2
by: Carl Fenley | last post by:
Help a newbie out. I cannot seem to explicitly convert an Object to a Reflection.AssemblyCompanyAttribute type using DirectCast(). Turning Option Strict "Off" is not an option. Here is the...
0
by: JerryH | last post by:
I'm using a 3rd party dll to retrieve some data (I have no choice in this!), this returns an Object variable that I know contains an array of singles. The following code works fine if I set option...
2
by: andycool1 | last post by:
I get the following error in my code when I set Option Strict to On: Option Strict On disallows implicit conversions from 'System.Object' to 'System.Drawing.Image' The blue error underline...
3
by: c676228 | last post by:
Hi all, I have the following code, without option Strict on, it seems work OK, but when option strict is on. I have a problem for the assignment. Dim ctrlarr(5) As PeopleInfo 'poepleinfo is...
6
by: Larry | last post by:
Hi All, I am in .NET 2003 I have a form and a toolbar on the form. When the user clicks on a button on the toolbar I call the following Sub I get a crash on the last line: ...
1
by: =?Utf-8?B?QU1lcmNlcg==?= | last post by:
I have a strange situation with vb 2005 regarding option strict that looks like a compiler bug to me. Consider: Dim f1 As New Font("Arial", 8.25) Dim f2 As New Font("Arial", 8.25,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.