|
If you're worried about dupliaction, use a spell check tree.
|
|
|
|
|
|
That makes perfect sense.
However isn't it rather silly not to store a dictionary in a Dictionary?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
That depends on if you need to be able to search on more than one parameter of each record.
The latest nation. Procrastination.
|
|
|
|
|
I read "store" as "persist".
|
|
|
|
|
Contains all words in the English language.
string[] dictionary = new string[] {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
Of course some assembly is required.
only two letters away from being an asset
|
|
|
|
|
Hi,
I am having a custom class which is of type array.
one of its elements is date.
I want all elements of this class to be be sorted on basis of date.
e.g
Class Payment
{
date;
amount;
order;
}
Another calss
{
Payment[] pay=new Payment[4];
for(int i=0;i<3;i++)
{
pay[i]=new Payment();
pay[i].date="Monday";
pay[i].amount=5;
pay[i].order=abc;
}
//sort pay as per date that is populated in pay
say pay[0].date=Monday;
pay[1].date=Wednesday;
pay[2].date=Tuesday;
I want the entire row of pay to be sorted on basis of date.
}
Thanks,
Mini
Best Regards,
Mini Thomas
|
|
|
|
|
Hi,
this[^] explains how to sort all kinds of collections.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Populate a list with the array content.
Create a custom Comparer that compares two payment objects based on date.
Use the Sort method to sort the elements of the list.
If you need so, convert back the list to an array.
|
|
|
|
|
Mirko1980 wrote: Populate a list with the array content.
Why? don't you like public static void Sort(Array array, IComparer comparer) ?
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Nothing, only I didn't think about it
|
|
|
|
|
Hi Guys,
I have alerady tried with IComparable
but it doesn't return sorted array, maybe I am implementing in the wrong way.
Can you guys help me out with the exact implementation?
This payment Array is being accessed in another class say PaymentHistory and I wanna sort as per date the Payment array in PaymentHistory class.
Best Regards,
Mini Thomas
|
|
|
|
|
What have you tried? IComparable alone does not sort anything.
Are you using Array.Sort? Or a List?
Post the code you are using.
|
|
|
|
|
hi friends.
is there anyone who is knows, how to i learn an email server is pop3 mail server or not?
viva la commune
|
|
|
|
|
Poke it with a TCP connection, if it's a POP3 server it should tell you that as soon as it is connected
|
|
|
|
|
harold aptroot wrote: Poke it with a TCP connection
Poking it might just make it angry and it could POP you.
only two letters away from being an asset
|
|
|
|
|
|
Can anyone tell me what version of C# is installed with Visual Studio 2005? I tried looking at VS help and googled the question with no luck.
|
|
|
|
|
Hi,
I guess it's .NET 2.0, since you can see it's combined with Visual Studio 2005, well, for example, look at the right side of this page[].
|
|
|
|
|
C# V2.0
Or to be more accurate; none. The C# compiler is installed with .net, not with Visual Studio. Visual Studio is simply a front end for the compiler.
|
|
|
|
|
If I run csc /help , I get
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.3053
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
Hope this helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
He asked about the version of the language, not of the compiler.
|
|
|
|
|
Oops!
**ahem** Version 2.0. Definitely. Yes, 2.0.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
Hello,
I am using
string exePath = System.Windows.Forms.Application.ExecutablePath;
string myFilePath = Path.GetDirectoryName(exePath) + Path.DirectorySeparatorChar + "MyFile.xml";
to get working path of a file and it works fine when i run the application with VS2008.
I have written test method "[TestMethod]" to test a fuctionality which uses the above application path but my test result is failed because if i run test case then the excecutable path refers to visual studio env exe and my file is not present over there.
I don't want to hard code the file path. Please tell me how can i make my test case successfull or get the correct application path.
Thanks in Advance.
|
|
|
|