Click here to Skip to main content
15,885,914 members
Home / Discussions / C#
   

C#

 
QuestionRe: printing in C#.net Pin
varun_mca_ju5-Aug-08 0:20
varun_mca_ju5-Aug-08 0:20 
AnswerRe: printing in C#.net [modified] Pin
teejayem5-Aug-08 2:59
teejayem5-Aug-08 2:59 
GeneralRe: printing in C#.net...IT WORKS LIKE A CHARM Pin
varun_mca_ju5-Aug-08 21:42
varun_mca_ju5-Aug-08 21:42 
QuestionC# windows application and web service Pin
farhit4-Aug-08 1:55
farhit4-Aug-08 1:55 
Questionreverse lookup in dictionary Pin
vytheese4-Aug-08 1:45
professionalvytheese4-Aug-08 1:45 
AnswerRe: reverse lookup in dictionary Pin
User 66584-Aug-08 2:12
User 66584-Aug-08 2:12 
GeneralRe: reverse lookup in dictionary Pin
vytheese4-Aug-08 2:19
professionalvytheese4-Aug-08 2:19 
GeneralRe: reverse lookup in dictionary Pin
User 66584-Aug-08 2:25
User 66584-Aug-08 2:25 
vytheese wrote:
but in my case both are unique.


In this case I would derive a class from IDictionary that will internally hold two dictionaries, one for key->value and one for value->key. Something like:

public class TwoWayDictionary<K, V> : IDictionary<K, V>


Override the methods like Add, Contains etc to allow adding, removing and searching by key and value in both of the dictionaries.

regards

modified 12-Sep-18 21:01pm.

GeneralRe: reverse lookup in dictionary Pin
vytheese4-Aug-08 2:41
professionalvytheese4-Aug-08 2:41 
GeneralRe: reverse lookup in dictionary Pin
Brady Kelly4-Aug-08 2:45
Brady Kelly4-Aug-08 2:45 
GeneralRe: reverse lookup in dictionary Pin
vytheese4-Aug-08 3:00
professionalvytheese4-Aug-08 3:00 
GeneralRe: reverse lookup in dictionary Pin
leppie4-Aug-08 3:24
leppie4-Aug-08 3:24 
AnswerRe: reverse lookup in dictionary Pin
PIEBALDconsult4-Aug-08 13:53
mvePIEBALDconsult4-Aug-08 13:53 
Question.Tex files and word equations Pin
chrisha844-Aug-08 1:18
chrisha844-Aug-08 1:18 
Questionwhy we use CaspolSecurityPolicyCreator.cs Class Pin
wasimsharp4-Aug-08 1:16
wasimsharp4-Aug-08 1:16 
AnswerRe: why we use CaspolSecurityPolicyCreator.cs Class Pin
Ashfield4-Aug-08 1:31
Ashfield4-Aug-08 1:31 
QuestionSilly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 1:03
Mohammad A Gdeisat4-Aug-08 1:03 
AnswerRe: Silly question - bool initialization in C# Pin
wasimsharp4-Aug-08 1:13
wasimsharp4-Aug-08 1:13 
GeneralRe: Silly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 1:16
Mohammad A Gdeisat4-Aug-08 1:16 
GeneralRe: Silly question - bool initialization in C# Pin
MarkB7774-Aug-08 1:48
MarkB7774-Aug-08 1:48 
GeneralRe: Silly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 1:50
Mohammad A Gdeisat4-Aug-08 1:50 
GeneralRe: Silly question - bool initialization in C# Pin
J4amieC4-Aug-08 2:20
J4amieC4-Aug-08 2:20 
GeneralRe: Silly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 5:28
Mohammad A Gdeisat4-Aug-08 5:28 
AnswerRe: Silly question - bool initialization in C# Pin
Simon P Stevens4-Aug-08 1:13
Simon P Stevens4-Aug-08 1:13 
GeneralRe: Silly question - bool initialization in C# Pin
Mohammad A Gdeisat4-Aug-08 1:17
Mohammad A Gdeisat4-Aug-08 1:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.