Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 4 and Visual Studio 2010 > .NET 4 and Visual Studio 2010 General Discussions
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET 4 and Visual Studio 2010 General Discussions For discussing anything about .NET 4, WPF, WCF, the rest of the .NET 4 Framework, and Visual Studio 2010 that isn't about a specific Wrox book. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET 4 and Visual Studio 2010 General Discussions section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 12th, 2016, 11:05 AM
Authorized User
Points: 376, Level: 6
Points: 376, Level: 6 Points: 376, Level: 6 Points: 376, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 84
Thanks: 11
Thanked 0 Times in 0 Posts
Default I have a string array that I need help with

My shared sub, the strCitationNumbers string array can have a number or 'No match' text.
So I would like to add if statement to check what's in the strCitationNumbers.
If a number (string) is found in the strCitationNumbers, I want to output an error message saying 'Duplicate case'.
How do I do it?
Code:
Shared Sub TestCitationGetCaseNumber()
         Dim strCitationNumbers() As String
        Dim strCitationNumber As String = "2770043451123"
 strCitationNumbers = Msc.Integration.Mncis.Library.v4.Citation.GetCaseNumbersForCitation(strCitationNumber, False)   End Sub

Last edited by winkimjr2; August 12th, 2016 at 11:21 AM. Reason: Explained what the If statement is needed for
  #2 (permalink)  
Old August 12th, 2016, 12:28 PM
Authorized User
Points: 376, Level: 6
Points: 376, Level: 6 Points: 376, Level: 6 Points: 376, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 84
Thanks: 11
Thanked 0 Times in 0 Posts
Default Solution

Here is my solution

Code:
 If (strCitationNumbers(0) <> "No Matching Case") Then
            MsgBox("This is a duplicate")
        End If
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with String.Array fullingdale ASP.NET 2.0 Basics 0 February 14th, 2011 03:46 AM
Convering a String Array to an Integer array nkrust C# 9 November 17th, 2010 11:02 AM
String to array ajit Javascript 5 January 20th, 2007 03:02 PM
Casting String array to string Samatha ASP.NET 1.0 and 1.1 Professional 1 December 5th, 2006 06:46 AM
String to Array Psion PHP How-To 1 September 5th, 2006 11:36 AM



All times are GMT -4. The time now is 01:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.