Solved

C# to VB.Net translation on string array

Posted on 2011-03-25
3
295 Views
Last Modified: 2012-06-22
Hello everyone,

I am looking on some help translating something from c# to vb.net.  I have the api reference and the following is the c# code:

IDocument d = Factory.Document.GetInstance(os, "Document", "/Doc1");

d.FetchProperties(new string[] { "DocumentTitle", "DateCreated" });

Open in new window


It is the 2nd line I am stuck on, the new string[] portion.

I have tried doing this:

dim props() as string = d.FetchProperties( {DocumentTitle", "DateCreated"})

Open in new window


But thats not correct vb.net code and I cant figure it out for the life of me, I'm sure its something simple!

Kind regards,

DBridle
0
Comment
Question by:dbridle
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
kswathi earned 500 total points
ID: 35214189
Does  your method "FetchProperties" return a string array?
else try below:
d.FetchProperties( New String() {DocumentTitle", "DateCreated"})
0
 

Author Comment

by:dbridle
ID: 35214215
It works slightly different in .Net, I just found out.  Will award the points as you took the time to answer, however, it is simple dim props as IProperties = d.properties.

Easy when you know how I guess.  Hope this post helps others!
0
 

Author Closing Comment

by:dbridle
ID: 35214217
This was not the final solution, the final solution is shown in the above post.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question