Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting value from Binary field
Message
De
28/01/2014 00:37:30
 
 
À
27/01/2014 16:03:05
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01592445
Message ID:
01592474
Vues:
48
>>
>>Since the size of the hex presentation is twice the size of the byte array, you have to multiply by 2
>>
>>>> StringBuilder sb = new StringBuilder(length * 2);
>>
>>
>>
>>The bitshift: shifting one bit to the left (provided the argument is not negative) is faster. I prefer that
>>
>>
>>>>           StringBuilder sb = new StringBuilder(length << 1);
>>
>
>Cute :-)

Another thing I have found

(1) You have class with an array member ( I tested static, expect instance also)
(2) A method using that array frequently ( a loop or so)

It is faster to assign the array to a method variable and use the method variable instead of the class member
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform