Solved

C# to VB.Net translation on string array

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Asp.Net Session Question 2 36
Vb.net progressbar with timer1 in visual studio win app 11 38
"lblTime is not declared" 3 36
ComboBox to String Not Working 5 21
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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