Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 1st, 2005, 11:31 AM
Authorized User
Join Date: Feb 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts

private string OneItem(string whatever)
            return("<item><tag> $.value=\"" + whatever + "\" </tag> " + whatever + " </item>\r\n");

protected string CreateGrammar()
            // As if records in a recordset
            string grm = "\r\n";
            grm += OneItem("Albania");
            grm += OneItem("Algeria");
            grm += OneItem("Argentina");
            grm += OneItem("Australia");
            // . . .
            grm += OneItem("Zimbabwe");
            grm += OneItem("India");
            grm += OneItem("anand");
            return grm;

Instead of Protected i put Property.The error i got is i have to use method instead of property how should i write that.Please explain.

Old April 1st, 2005, 11:36 AM
Authorized User
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts

From Instant VB (www.instantvb.com):

Private Function OneItem(ByVal whatever As String) As String
            Return("<item><tag> $.value=""" & whatever & """ </tag> " & whatever & " </item>" & Constants.vbCrLf)
End Function

Protected Function CreateGrammar() As String
            ' As if records in a recordset
            Dim grm As String = Constants.vbCrLf
            grm &= OneItem("Albania")
            grm &= OneItem("Algeria")
            grm &= OneItem("Argentina")
            grm &= OneItem("Australia")
            ' . . .
            grm &= OneItem("Zimbabwe")
            grm &= OneItem("India")
            grm &= OneItem("anand")
            Return grm
End Function

Similar Threads
Thread Thread Starter Forum Replies Last Post
change password code musicdad Classic ASP Databases 1 March 6th, 2005 01:54 AM
Dynamic Backcolor change in VB caltito Access VBA 0 August 22nd, 2004 09:16 AM
How to change Regional Settings through VB zee_ahmed2002 Pro VB 6 2 July 26th, 2004 04:24 AM
Change line in VB.net Dinesh22 VB.NET 2002/2003 Basics 2 January 16th, 2004 02:27 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.