|
This C# Forum. Please Put it in ASP.NET Forum
|
|
|
|
|
Hi guys, im making an application kind of like a peer to peer program to share text over the network. Im originally thought I would use sockets and have one server object and one client object. But now my problem is what happens if Computer A needs to send something to B and then C? Do I disconnect the client, set the new IP address, then reconnect, then do that all again. Or what? That seems rather innefficient to me :-/
Im very new to network programming so any help would be appreciated. Whats the best way to send information when theres lots of peers?
Thank you!
|
|
|
|
|
Use Remoting
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
I created my own VS2005 custom wizard that can generate home bred code, reference dll's and create namespaces.
I'll have to clean it up a little and probably on some points I might do better. but it works. If I find the time I will try to write an article about it.
Thanks CP.
|
|
|
|
|
Nice
When are you sharing it?
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
ASAP ! which could mean anywhere between next week or next year unfortunately ....
|
|
|
|
|
if its next year , you should have told us about it next year
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Currently I've *fun* with reflection and generic lists.
Following code is given:
IList<String> myList = new List<String>();
So I tried to get the generic type:
Type t = myList.GetType();
Console.WriteLine(t.ToString());
But guess what I got:
System.Collections.Generic.List`1[System.String]
How can I get the generic type (String here)???
Has somebody a code snippet for me???
Thanks in advance.
|
|
|
|
|
I think this is right.It shows that this is of type list which contains string type.
Cheers!!
Brij
|
|
|
|
|
List<string> list = new List<string>();
Type listType = list.GetType();
Console.WriteLine(listType.GetGenericArguments()[0]);
edit: forgot to escape my angle brackets
modified on Friday, August 22, 2008 9:00 AM
|
|
|
|
|
J4amieC wrote: Console.WriteLine(listType.GetGenericArguments()[0]);
Thanks! That's it.
|
|
|
|
|
because your using String type of class. The answer is correct.
|
|
|
|
|
I want to a little software to realize below function:
when Opening the software is it docked on the right of the taskbar , then when you move the mouse on the screen, if there is a word below the cursor, It shows a messagebox to display the current word, if there is not any word below the cursor , then It doesn't show a messagebox
Many thanks
|
|
|
|
|
1. you can get the app to go where the clock is using a Notify Icon
2. i have no idea how you would get the text under the mouse, would the user need to select the word or just hover over any part? does the display need to be text or could you display an image, but i dont know how you would know what is text and what is not.
|
|
|
|
|
Thanks mark_w_ reply!
when the cursor hover over any part of the word(No need to select the word),it can show the current whole word,if there is no word under the mouse, then doesn't need show a messagexbox.
and the display need to be text.
|
|
|
|
|
How can i add stencilbar, property window grid and treeview in Ms visio using automation programming using c#.net
Tahir Makhdoom
|
|
|
|
|
How do I replace the following text
"<ns0:NxPrinterImportAll xmlns:ns0=\"http://elite.com/schemas/transaction/process/write/NxPrinterImportAll\">
to
Note that I want to remove backslashes i.e. \
"<ns0:NxPrinterImportAll xmlns:ns0="http://elite.com/schemas/transaction/process/write/NxPrinterImportAll">
I tried replace but can not get the \ to replace with nothing.
Thanks
|
|
|
|
|
Use
string val = mystring.Replace(@"\", string.Empty);
|
|
|
|
|
Hi,
That does not make a difference because the output string is the same as the first string.
|
|
|
|
|
Either what Pete suggested, or:
Replace("\\", "");
The backslash must be doubled because it is used for so-called escape characters. For example "\n" means newline, "\t" means tab, etc. That's why to indicate a single backslash, you use "\\".
For the differences between the two types of sting forms read this:
http://msdn.microsoft.com/en-us/library/aa691090.aspx[^]
|
|
|
|
|
Hello,
That does not make any difference to the output either.
|
|
|
|
|
Hi,
I figured it out.
This is a feature in the visual studio.
If I output to output window then it shows without the backslash.
Thanks for ttrying guys.
|
|
|
|
|
In C#.NET 2008 setup project, i need to build a setup file which can detect whether the same version was installed or not.
Now, when i run setup file, it always show error below
Another version of this product is already installed
Instead of this, I need it automatically popup uninstallation form.
I've google for many hours but found nothing.
How can i do this?
Thank for help
^^
|
|
|
|
|
You probably changed the product/upgrade id. There are countless resources on how to do this correctly.
|
|
|
|
|
Can we change the value of a variable while debugging a C# application?
|
|
|
|