C# to VB.Net translation on string array

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,

Who is Participating?
kswathiConnect With a Mentor Commented:
Does  your method "FetchProperties" return a string array?
else try below:
d.FetchProperties( New String() {DocumentTitle", "DateCreated"})
dbridleAuthor Commented:
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!
dbridleAuthor Commented:
This was not the final solution, the final solution is shown in the above post.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.