Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
| Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 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
  #1 (permalink)  
Old August 14th, 2006, 01:58 PM
Authorized User
 
Join Date: Aug 2006
Location: , , Netherlands.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default Duplicate Array value/string

Hi All,

I was wondering if .NET Framework contains an array function which searches for duplicate value or string. At this time I am using my own functions/methods but they are probably not the most effective.

Can someone help me with this question.

Regards,
.NETmateur
Electrical Engineer
__________________
Regards,
.NETamateur
<font color=\"blue\"><b>Electrical Engineer</b></font id=\"blue\">
  #2 (permalink)  
Old August 15th, 2006, 04:25 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Take a look at the System.Collections and other related namespaces (System.Collections.ObjectModel and System.Collections.Specialized).

These namespaces contain a number of collections; one of which that may serve your goals. For example, a Dictionary might do the trick; where each value is stored by a unique key.

P.S. No need to post Test or Bump messages. Things generally work fine over here, and if someone knows an answer to your question, you'll get it. Otherwise you won't....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #3 (permalink)  
Old August 15th, 2006, 04:43 PM
Authorized User
 
Join Date: Aug 2006
Location: , , Netherlands.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar.

I will take a look to these Namespaces to see if I can replace some or all of my own written array operation functions.



Regards,
.NETmateur
Electrical Engineer
  #4 (permalink)  
Old November 3rd, 2006, 08:58 AM
Authorized User
 
Join Date: Aug 2006
Location: , , Netherlands.
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Imar, Thanks.
The System.Collections and other related namespaces (System.Collections.ObjectModel and System.Collections.Specialized) did not help me achieve what I want.

I revised my array functions which have now very good performance.

Regards,
.NETamateur
Electrical Engineer


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convering a String Array to an Integer array nkrust C# 9 November 17th, 2010 12:02 PM
String to array ajit Javascript 5 January 20th, 2007 04:02 PM
Casting String array to string Samatha ASP.NET 1.0 and 1.1 Professional 1 December 5th, 2006 07:46 AM
String to Array Psion PHP How-To 1 September 5th, 2006 11:36 AM
String array declaration mkpriya VS.NET 2002/2003 8 June 13th, 2003 07:21 PM





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