473,666 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

convert string array to long array

Does anyone have a snippet of code that will convert a string array to a
long array? I've nearly smashed my head against the wall trying to figure
this out.

I'm Using vb.net 2005

Pls reply asap. I thaanku all in advance. God bless u.

Pls reply with code.
Mar 9 '06 #1
3 4326
Newbie,

It is probably better that you explain why. Mostly are there some
misunderstandin gs about strings and longs by newbies as they are in Net.

Cor
"XML newbie: Urgent pls help!"
<XM************ ********@discus sions.microsoft .com> schreef in bericht
news:F2******** *************** ***********@mic rosoft.com...
Does anyone have a snippet of code that will convert a string array to a
long array? I've nearly smashed my head against the wall trying to figure
this out.

I'm Using vb.net 2005

Pls reply asap. I thaanku all in advance. God bless u.

Pls reply with code.

Mar 9 '06 #2
>Does anyone have a snippet of code that will convert a string array to a
long array?


What's the format of each string and how do you expect it to convert
to a Long?
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Mar 9 '06 #3
I have a combobox that displays Asset names. Asset List is a long array of
AssetIds. Every Asetname in the combobox is associated with AssetID.

I need to pass an array of AssetIDs as long from here(every assetname has
assetid) into the following line:

doc.LoadXml(EDP .ExportPosition s(g_SessionID, cmbStartDateand Time.Text,
cmbEndDateandTi me.Text, cmbAsset.Select edText).ToStrin g) as per the
following function

Public Function ExportPositions (ByVal SessionID As String, ByVal
StartDateTime As Date, ByVal EndDateTime As Date,
<System.Xml.Ser ialization.XmlA rrayItemAttribu te("AssetID",
IsNullable:=fal se)> ByVal AssetList() As Long) As Position()
When, I do cmbAsset.Select ed Text, it is stored as string array and the
function expects it to be array of Long.

Everything is fine, except the cmbAsset.Select edText. I get the error"can't
cast string to an array of long"
"Cor Ligthert [MVP]" wrote:
Newbie,

It is probably better that you explain why. Mostly are there some
misunderstandin gs about strings and longs by newbies as they are in Net.

Cor
"XML newbie: Urgent pls help!"
<XM************ ********@discus sions.microsoft .com> schreef in bericht
news:F2******** *************** ***********@mic rosoft.com...
Does anyone have a snippet of code that will convert a string array to a
long array? I've nearly smashed my head against the wall trying to figure
this out.

I'm Using vb.net 2005

Pls reply asap. I thaanku all in advance. God bless u.

Pls reply with code.


Mar 10 '06 #4

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

Similar topics

5
18005
by: Andrew V. Romero | last post by:
At work we have an excel file that contains the list of medications and their corresponding strengths. I would like to save the excel file as a text list and paste this list into a javascript function and have JS put this into an array. Then JS would use this array to create a selection list which displays only the names of the drugs. When the user selections one of the drugs, another selection list will be loaded with the avaiable...
2
12184
by: Mel WEaver | last post by:
Hello, I have the following delphi structure for a binary file. I'm looking for idea how to read this file. Mel type TMenuDataStruct = packed record exename : string;
1
2298
by: Mark Hollander | last post by:
Hi All, Could you please help me convert this code so that it will run in VB.NET Thank You Mark Hollander Private Type USER_INFO Name As String
5
12717
by: XML newbie: Urgent pls help! | last post by:
function to convert string to 1 dimensional array of long in VB.Net
43
8434
by: Steven T. Hatton | last post by:
http://public.research.att.com/~bs/bs_faq2.html#int-to-string Is there no C library function that will take an int and convert it to its ascii representation? The example Bjarne shows in his faq is not extremely convenient. -- NOUN:1. Money or property bequeathed to another by will. 2. Something handed down from an ancestor or a predecessor or from the past: a legacy of religious freedom. ETYMOLOGY: MidE legacie, office of a deputy,...
29
5074
by: Harlin Seritt | last post by:
Hi... I would like to take a string like 'supercalifragilisticexpialidocius' and write it to a file in binary forms -- this way a user cannot read the string in case they were try to open in something like ascii text editor. I'd also like to be able to read the binary formed data back into string format so that it shows the original value. Is there any way to do this in Python? Thanks!
19
5325
by: est | last post by:
From python manual str( ) Return a string containing a nicely printable representation of an object. For strings, this returns the string itself. The difference with repr(object) is that str(object) does not always attempt to return a string that is acceptable to eval(); its goal is to return a printable string. If no argument is given, returns the empty string, ''.
14
13490
by: rtillmore | last post by:
Hello, I did a quick google search and nothing that was returned is quite what I am looking for. I have a 200 character hexadecimal string that I need to convert into a 100 character string. This is what I have so far: #include <stdio.h> #include <stdlib.h> #include <string.h>
15
9067
by: khumayun | last post by:
i have a byte array that contains hex values. i want to convert 6 bytes of it into decimal values and display the result as a string. also when do i have to take the endianess into consideration? i have tried to basically do a direct assignment to unsigned long and i saw that it did convert it correctly but i did not use any endianess. although i still did not convert it into a string. when do i use endianess ( i am developing on...
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8783
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2773
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.