You can substring your string to its length - 1, e.g.

String input = "Hello..";
String output = input.Substring(0, input.Length - 1);
Console.WriteLine(output);

On 29 Sep, 16:17, Fabian <[EMAIL PROTECTED]> wrote:
> Dear Group-
>
> In C#, if I write:
>
> WriteLine("Hello..");   // yes, double period
>
> Is there a way to BACKSPACE the last dot as in:
>
> Write("\b");    // hoping to backspace the last period
>
> Otherwise, how can one print an array's contents separated by commas,
> except for the last element.
>
> myArray={1,2,3,4,5}
>
> i.e.,
> //print routine outputs
> 1,2,3,4,5,
>
> Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
 <p><a href="http://feeds.feedburner.com/DotNetDevelopment";><img 
src="http://feeds.feedburner.com/~fc/DotNetDevelopment?bg=99CCFF&amp;fg=444444&amp;anim=1";
 height="26" width="88" style="border:0" alt="" /></a></p>
-~----------~----~----~----~------~----~------~--~---

Reply via email to