Question: the date Picker I have right now has the style like : mm/dd/YYYY and it displays at Textfield in "YYYY/MM/DD".

how can I change my code so that the datepicker shown is also changed to " YYYY/MM/DD".
Here is my code:

```
NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar] ;
        NSDate *currentDate = [NSDate date];
        NSDateComponents *comps = [[NSDateComponents alloc] init] ;
        [comps setYear:-10];
        NSDate *maximumDate = [calendar dateByAddingComponents:comps toDate:currentDate  options:0];
        [comps setYear:-10];
        NSDate *minimumDate = [calendar dateByAddingComponents:comps toDate:currentDate  options:0];

        UIDatePicker *datePicker = [[UIDatePicker alloc]init];
        datePicker.datePickerMode = UIDatePickerModeDate;
        [datePicker setMaximumDate:maximumDate];
        [datePicker setMinimumDate:minimumDate];
        [datePicker addTarget:self action:@selector(datePickerValueChanged:) forControlEvents:UIControlEventValueChanged];
        [self.Birthday setInputView:datePicker] ; 

```

Answer: 
```
var parts = s.Split(',').Select(part => part.Trim());

```
If you *really* want to avoid LINQ, you can split on multiple characters and discard the extra "empty" entries you get between the "," and spaces. Note that you can end up getting odd results (e.g. if you have consecutive "," delimiters you won't get the empty string in between them anymore):

```
s.Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries);

```

This will work for your sample input, but its very fragile. For example, as @Oscar points out, whitespace *inside* your tokens will cause them to get split as well. I'd highly recommend you go with one of the LINQ-based options instead.