Click here to Skip to main content
15,895,709 members
Home / Discussions / C#
   

C#

 
GeneralRe: beginners question Pin
Pete O'Hanlon21-Apr-08 9:34
mvePete O'Hanlon21-Apr-08 9:34 
GeneralRe: beginners question Pin
carbon_golem21-Apr-08 9:43
carbon_golem21-Apr-08 9:43 
GeneralRe: beginners question Pin
Spacix One21-Apr-08 9:50
Spacix One21-Apr-08 9:50 
GeneralRe: beginners question Pin
Guffa21-Apr-08 21:25
Guffa21-Apr-08 21:25 
Generalcut string if it is to long for a field Pin
stephan_00721-Apr-08 9:15
stephan_00721-Apr-08 9:15 
GeneralRe: cut string if it is to long for a field Pin
damianrda21-Apr-08 9:23
damianrda21-Apr-08 9:23 
GeneralRe: cut string if it is to long for a field Pin
Spacix One21-Apr-08 9:41
Spacix One21-Apr-08 9:41 
GeneralRe: cut string if it is to long for a field Pin
stephan_00721-Apr-08 9:47
stephan_00721-Apr-08 9:47 
thanks for the hints. i guess the best solution will be

if (mystring.length > maximumlength)
{
  mystring = mystring.Substring(0, maximumlength);
}


so if the string is already smaller than the maximum length, then it is easy to insert it, but if it is longer, then just the first characters (up to maximumlength) should be insert.

thanks again for the hints. i didn't know it was this easy Big Grin | :-D

stephan.
Generalassembly in C code with a not so young compiler! Pin
turetschek21-Apr-08 8:22
turetschek21-Apr-08 8:22 
Generalwrong forum Pin
Luc Pattyn21-Apr-08 8:34
sitebuilderLuc Pattyn21-Apr-08 8:34 
GeneralRe: assembly in C code with a not so young compiler! Pin
ChrisKo21-Apr-08 10:05
ChrisKo21-Apr-08 10:05 
QuestionSortedList - KeyValuePair - InvalidCastException Pin
dennycrane21-Apr-08 7:59
dennycrane21-Apr-08 7:59 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
carbon_golem21-Apr-08 8:34
carbon_golem21-Apr-08 8:34 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
dennycrane21-Apr-08 8:43
dennycrane21-Apr-08 8:43 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
carbon_golem21-Apr-08 8:48
carbon_golem21-Apr-08 8:48 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
dennycrane21-Apr-08 8:49
dennycrane21-Apr-08 8:49 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
carbon_golem21-Apr-08 9:17
carbon_golem21-Apr-08 9:17 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
dennycrane21-Apr-08 9:21
dennycrane21-Apr-08 9:21 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
carbon_golem21-Apr-08 9:24
carbon_golem21-Apr-08 9:24 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
dennycrane21-Apr-08 9:32
dennycrane21-Apr-08 9:32 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
Pete O'Hanlon21-Apr-08 9:39
mvePete O'Hanlon21-Apr-08 9:39 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
dennycrane21-Apr-08 9:46
dennycrane21-Apr-08 9:46 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
carbon_golem21-Apr-08 9:18
carbon_golem21-Apr-08 9:18 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
carbon_golem21-Apr-08 9:19
carbon_golem21-Apr-08 9:19 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
carbon_golem21-Apr-08 9:23
carbon_golem21-Apr-08 9:23 

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.