Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
GeneralRandomly Removing an Item from an Array Pin
Ian Uy28-Apr-08 16:22
Ian Uy28-Apr-08 16:22 
GeneralRe: Randomly Removing an Item from an Array Pin
Paul Conrad28-Apr-08 16:24
professionalPaul Conrad28-Apr-08 16:24 
GeneralRe: Randomly Removing an Item from an Array Pin
Ian Uy28-Apr-08 20:15
Ian Uy28-Apr-08 20:15 
GeneralRe: Randomly Removing an Item from an Array Pin
PIEBALDconsult29-Apr-08 6:15
mvePIEBALDconsult29-Apr-08 6:15 
GeneralRe: Randomly Removing an Item from an Array Pin
Christian Graus28-Apr-08 18:12
protectorChristian Graus28-Apr-08 18:12 
QuestionProgramming to DataTables VS. Programming to type safe objects using generic interfaces? Pin
Steve Holdorf28-Apr-08 11:17
Steve Holdorf28-Apr-08 11:17 
GeneralRe: Programming to DataTables VS. Programming to type safe objects using generic interfaces? Pin
Pete O'Hanlon28-Apr-08 11:52
mvePete O'Hanlon28-Apr-08 11:52 
Generalcombining number and dateformating in one funcrtion Pin
stephan_00728-Apr-08 10:02
stephan_00728-Apr-08 10:02 
hy everyone!

i was wondering if it is possible to combine number formating and dateformating in one function.

formating a number is done e.g. by using {#,##0.0000} and date formating is done by using {0:dd/MM/yyyy}.

i was wondering if it is possible to separate the numberformating and the dateformating. well, if there are these two, then you might try to get the difference by checking for the ":". But that's no "clean" way to do this.

public static string ConvertFormats (string input, string formatstring)
{
  if (formatstring.Contains(":")
  {
    // date
  }
  else
  {
    // number
  }
  return input; //formated in the if else above
}


So what if this function should format stringlength as well? then this won't work anymore.

Anyone a better idea?

thanks!

Stephan.
GeneralRe: combining number and dateformating in one funcrtion Pin
Gareth H28-Apr-08 10:35
Gareth H28-Apr-08 10:35 
GeneralRe: combining number and dateformating in one funcrtion Pin
PIEBALDconsult28-Apr-08 10:43
mvePIEBALDconsult28-Apr-08 10:43 
GeneralRe: combining number and dateformating in one funcrtion Pin
stephan_00728-Apr-08 10:54
stephan_00728-Apr-08 10:54 
GeneralRe: combining number and dateformating in one funcrtion Pin
PIEBALDconsult28-Apr-08 13:54
mvePIEBALDconsult28-Apr-08 13:54 
GeneralSystem.Timers.Timer Pin
geekfromindia28-Apr-08 9:11
geekfromindia28-Apr-08 9:11 
GeneralRe: System.Timers.Timer Pin
som.nitk28-Apr-08 9:14
som.nitk28-Apr-08 9:14 
GeneralRe: System.Timers.Timer Pin
PIEBALDconsult28-Apr-08 9:20
mvePIEBALDconsult28-Apr-08 9:20 
GeneralRe: System.Timers.Timer Pin
Zoltan Balazs28-Apr-08 9:41
Zoltan Balazs28-Apr-08 9:41 
GeneralRe: System.Timers.Timer Pin
Anthony Mushrow28-Apr-08 14:13
professionalAnthony Mushrow28-Apr-08 14:13 
GeneralRe: System.Timers.Timer Pin
geekfromindia28-Apr-08 16:21
geekfromindia28-Apr-08 16:21 
GeneralWindows forms and animated gift progress Pin
Saamir28-Apr-08 8:34
Saamir28-Apr-08 8:34 
GeneralRe: Windows forms and animated gift progress Pin
Christian Graus28-Apr-08 11:20
protectorChristian Graus28-Apr-08 11:20 
GeneralRe: Windows forms and animated gift progress Pin
Saamir28-Apr-08 11:31
Saamir28-Apr-08 11:31 
GeneralRe: Windows forms and animated gift progress Pin
Christian Graus28-Apr-08 12:56
protectorChristian Graus28-Apr-08 12:56 
GeneralRe: Windows forms and animated gift progress Pin
Saamir29-Apr-08 3:35
Saamir29-Apr-08 3:35 
GeneralRe: Windows forms and animated gift progress Pin
wzett29-Apr-08 21:19
wzett29-Apr-08 21:19 
GeneralRe: Windows forms and animated gift progress Pin
Saamir30-Apr-08 2:52
Saamir30-Apr-08 2:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.