|
Hi,
I used serial ports a lot before .NET existed, using standard Win32 functions.
From my .NET serial experience, I have no reason to claim .NET has added a lot of overhead to those functions, however I do not have proof to the contrary either.
BTW: Under high communication loads, I would not be inclined to use the DataReceived event; I'd rather use a separate thread with an outstanding Read. That way I'm in charge of how much data gets read and when it gets processed, as DataReceived lacks a clear specification.
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!
|
|
|
|
|
I use the SerialPort class a lot in my work, and haven't had any issues. One of my current projects uses 921600 baud (fastest you can set in HyperTerminal) and it's been performing fine.
Dybs
|
|
|
|
|
Hi every one, i'm trying to make a dictionary in C# in my country (Ethiopia) official language Amharic that means a dictionary that converts English to Amharic. I designed all words but it is difficult for me to store all English words that are used to be searched. Please guys help me in what format do i've to store those words?
Thank YOU SO MUCH
|
|
|
|
|
Maybe you can store all the words in a StringCollection and search in the collection for the desired word?
|
|
|
|
|
Hi,
that would have to be a Dictionary<string, List<string>> so the key can be an English word, and the value would be a list of Amharic words, as an English word may have more than one meaning and one translation.
However if you want to store metadata (such as noun/verb/...), you would have to define a class or struct Word , and then your dictionary becomes a Dictionary<Word, List<Word>>
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!
|
|
|
|
|
Thank u Luc Pattyn that is a good idea
|
|
|
|
|
you're welcome.
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!
|
|
|
|
|
Luc Pattyn wrote: However if you want to store metadata (such as noun/verb/...), you would have to define a class or struct Word, and then your dictionary becomes a Dictionary<word, list<word="">>
This is less than optimal. In a large dictionary you'd have massive duplication in the List<word>'s. Probably the best option would be to do 2 dictionary<>'s and create a key/ID for the english words.
Dictionary<Word, List<int>> TranslationDictionary;
Dictionary<int, Word> EnglishDictionary;
The latest nation. Procrastination.
|
|
|
|
|
I agree.
BTW: Are you aware you inverted the translation? is there a reason for that?
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!
|
|
|
|
|
Of course I did. It's so I could... err... in order to... uhhh... because it's... FRIDAY!
The latest nation. Procrastination.
|
|
|
|
|
that's OK then
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!
|
|
|
|
|
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
|
|
|
|