Solved

C# to VB.Net translation on string array

Posted on 2011-03-25
3
283 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now