473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Correct MetaWeblogAPI VisualBasic .NET Code Sample

MSDN has sample code for interacting with the MetaWeblog API

C# Sample - complete and compiles.
http://msdn.microsoft.com/library/de...ode_Sample.asp

VB sample - is incomplete and incorrect.
http://msdn.microsoft.com/library/de...ode_Sample.asp

Can someone post the equivalent VB code just for this snippet?

C#
/// <summary>
/// Returns the most recent draft and non-draft blog posts sorted in
descending order by publish date.
/// </summary>
/// <param name="blogid"This should be the string MyBlog, which
indicates that the post is being created in the user's blog. </param>
/// <param name="username" The name of the user's space. </param>
/// <param name="password"The user's secret word. </param>
/// <param name="numberOfPosts"The number of posts to return. The
maximum value is 20. </param>
/// <returns></returns>
[XmlRpcMethod("metaWeblog.getRecentPosts")]
public Post[] getRecentPosts(
string blogid,
string username,
string password,
int numberOfPosts){
return (Post[]) this.Invoke("getRecentPosts", new object[]{ blogid,
username, password, numberOfPosts});
}
The given VB.net code is incorrect

'/ <summary>
'/ Returns the most recent draft and non-draft blog posts sorted in
descending order by publish date.
'/ </summary>
'/ <param name="blogid">This should be the string MyBlog, which
indicates that the post is being created in the user's blog.</param>
'/ <param name="username">The name of the user's space.</param>
'/ <param name="password">The user's secret word.</param>
'/ <param name="numberOfPosts">The number of posts to return. The
maximum value is 20.</param>
'/ <returns></returns>

<XmlRpcMethod("metaWeblog.getRecentPosts")_
Public Property getRecentPosts(() As Post()
End Property
)
End Function

Sep 24 '06 #1
0 1124

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Henke | last post by:
Hi! Is there a simple way to check if a string entered in a text box is a valid integer? Thanks in advance! /Henke
2
by: darrel | last post by:
I've built a control. At the top of my control, I have this: Imports Microsoft.VisualBasic Then, later, I call a function like this: DateTime.Now.Year.ToString() This works fine on my...
3
by: Ryan Ternier | last post by:
Customers keep getting this error, but we've never been able to re-produce it. Any help on this would be awesome. Here's the error message we get. Date and Time Occured: Wednesday, June...
1
by: amitbadgi | last post by:
I am gettign this error, while migration an app to asp.net Exception Details: System.FormatException: Input string was not in a correct format. Source Error: Line 19: Dim enddate =...
15
by: Phill. W | last post by:
Is anyone writing VB.Net (2003) code /without/ referencing the Microsoft.VisualBasic namespace(?), regardless of whether its Import'ed or not? The Powers That Be here are trying to introduce a...
2
by: Steve | last post by:
Having only recently migrated across from VB6 to VB.NET I'm still unsure whether or not I should be making (heavy) use of the Microsoft.VisualBasic namespace in new applications. I've read a lot...
8
by: Dave | last post by:
I'm trying to import Microsoft.VisualBasic to use the IsNumeric function in my C# code but all I see is: Microsoft.VisualBasic.VBCodeProvider while using Intellisense... From samples shouldn't...
7
by: tjonsek | last post by:
I'm building a string to be used as the body of an email. I'm getting this error message. "Input String Not In Correct Format". I've checked several newsgroups, however, for the posts I found...
19
by: yxq | last post by:
Hello, I want to get the string resource from DLL file, the code work well for Vista x86, but it will not work on Vista x64, why? can anyone help to view the code below? thank you very much. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.