Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# syntax question: switch and IndexOf
Message
De
05/05/2005 09:50:54
 
 
À
04/05/2005 14:09:02
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01010821
Message ID:
01011270
Vues:
14
Hi Alex,
>The if..elseif example mentioned in this thread is working fine now and is fast enough.
ok, but [for mental gymnastics only, since it is "learnwork"] perhaps I was a bit too short in my answer.
My assumption on eliminating dates stem from the fact that the characteristic strings in
your examples are (vfp code for easier experimentation...) sitting to the left of a systematic file ending.

So I'ld try to parse from the right, and either find a static start point or a dynamic one

function signifStr(tcFile)
* snip date-part on right side
tcFile = LEFT(m.tcFile, RAT("-", m.tcFile, 2)-5)
#if .t. && static or dynamic ??
return RIGHT(m.tcFile, 13)
#else
return Right(m.tcFile, Rat(" ", m.tcFile, 3)
#endif

The resulting string, if the function can be written to return a significant string,
could be the key to a collection or it's hashkey could be examined or a crc32-number could be generated...

regards

thomas
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform