We know, C#, generate a Unique ID, for each visual element incorporate to its form. I need to create a unique ID to name my files, how can I do that, without have to create my own algorithm
You can just use a new Guid, and then use the string representation for
that. That ID is guaranteed to be unique for something like the next 5000
years if you had generated 1000 per second during that time. It's going to
be ^pretty^ unique.
"Hector Martinez" <anonymous@disc ussions.microso ft.com> wrote in message
news:D26594A7-F0AA-4537-B97C-9FC234E5A6D5@mi crosoft.com...[color=blue]
>
>
> We know, C#, generate a Unique ID, for each visual element incorporate[/color]
to its form. I need to create a unique ID to name my files, how can I do
that, without have to create my own algorithm.[color=blue]
>
> I hope somebody can help me, thanks in advantage.
>[/color]
Another fascinating tidbit about which I've often wondered. :)
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard .caspershouse.c om> wrote in
message news:O$fkTkqrDH A.2004@TK2MSFTN GP10.phx.gbl...[color=blue]
> Hector,
>
> You can just use a new Guid, and then use the string representation[/color]
for[color=blue]
> that. That ID is guaranteed to be unique for something like the next 5000
> years if you had generated 1000 per second during that time. It's going[/color]
to[color=blue]
> be ^pretty^ unique.
>[/color]
If they are temp files, You can use System.IO.Path. GetTempFileName ().
-mike
MVP
"Hector Martinez" <anonymous@disc ussions.microso ft.com> wrote in message
news:D26594A7-F0AA-4537-B97C-9FC234E5A6D5@mi crosoft.com...[color=blue]
>
>
> We know, C#, generate a Unique ID, for each visual element incorporate[/color]
to its form. I need to create a unique ID to name my files, how can I do
that, without have to create my own algorithm.[color=blue]
>
> I hope somebody can help me, thanks in advantage.
>[/color]
Comment