|
It is also the suggestion of MS FxCop. Never use an array directly in a property. The suggestion is always change it to a method.
|
|
|
|
|
I was very surprised to see breakpoints work fine when the getter properties return a simple variable or a collection such as a List<int>, and they don't when the return type is an array. That doesn't make much sense to me.
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!
|
|
|
|
|
hi, currently working on an internet cafe software which will be in client/server structure.Client and server will communicate in both ways(customers give orders from clients and server controls computers) and I am planning to use TCP sockets. So am I on the right direction? or what would be the best way? thanks in advance
a fast and stable connection type and your valuable comments would be nice
|
|
|
|
|
There is various way to do this... whatever I think for data transportation you should try web service...
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
to make it clear, my program will be used in one place.All clients and the server will be side by side. so why web service?
|
|
|
|
|
Well...TCP/IP socket is good for small transaction.... My point of view was the data transport mechanism.. you know HTTP over TCP/IP allow you to transfer data as xml format...which is much more reliable,secured.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Md. Marufuzzaman wrote: My point of view was the data transport mechanism
to get the best reply I think I have to be more specific. Things that I am planning to handle with the server part of the program are:
(program will be used in LAN with 27 computers)
- switch on/of client computers
- open/close customer accounts(keep records of passed/elapsed times and charges them to account
- always live connection to see if the client is connected or not
- sending small files to clients
(I don't care about security at all)
modified on Saturday, October 10, 2009 4:00 PM
|
|
|
|
|
here you go
An Asynchronous Socket Server and Client[^]
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
|
Could you please clarify... Why you are saying TCP is usually fine?
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Well how often do you use UDP? And other protocols (like DCCP, SCTP, RSVP and ECN) are extremely rare
|
|
|
|
|
The other protocol SCTP is not rare. In Telecom, for Sigtran, SCTP is used.
|
|
|
|
|
|
hi,
Could someone please translate this code to vb.net ?
static string str= "OKVALUES";
static string encode(string s)
{
string strTest = "";
for (int i = 0; i < s.Length; i++)
{
byte b = (byte)s[i];
strTest += str[b >> 4];
strTest += str[b & 0xf];
}
return strTest ;
}
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Why?
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Shared str As String = "OKVALUES"
Private Shared Function encode(ByVal s As String) As String
Dim strTest As String = ""
For i As Integer = 0 To s.Length - 1
Dim b As Byte = CByte(s(i))
strTest += str(b >> 4)
strTest += str(b And &Hf)
Next
Return strTest
End Function
Used: http://www.developerfusion.com/tools/convert/csharp-to-vb/[^]
|
|
|
|
|
Dim b As Byte = CByte(s(i))
I think the above line will generate a compile error...like
'Char' values cannot be converted to 'Byte'.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
I agree.
Dim b As Integer = Microsoft.VisualBasic.AscW(s(i)) should solve 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!
|
|
|
|
|
Why downgrade perfectly good code
only two letters away from being an asset
|
|
|
|
|
I do agree...
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Thank you all
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Hi.
I want to compare two arraylists with each other, but not with the compare method.
That means, I have two computers with an arraylist on each of them. If the contents of these arraylists are the same, the calculated value from the arraylist should also be the same.
So is it possible to compare collections this way? MD5? Hash value? Checksum? Whatever!
Thanks alot
|
|
|
|
|
lvq684 wrote: So is it possible to compare collections this way? MD5? Hash value? Checksum? Whatever!
Not really; these values are used to check whether the original data has been changed or corrupted in any way. However, they are not universally unique, so if two sets of data generate the same hash code, that does not guarantee that their contents are identical. The only way to compare two sets is to compare each item within the set.
|
|
|
|
|
Well the problem is that i am using .net remoting, and i gotta keep a clients arraylist updated. And it would be a waste of bandwith to send the arraylist as an object over to the server to compare it.
Are there any easier way around this problem then?
|
|
|
|
|
lvq684 wrote: Are there any easier way around this problem then?
Sorry, not that I know of. Does Google have any suggestions?
|
|
|
|