[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

C# to VB.Net translation on string array

Posted on 2011-03-25
3
Medium Priority
?
321 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
kswathi earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

650 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