.net - VB.NET to English - What is this line of code supposed to do? -


hi please interpret following line of code english?

"foo".trimend(new char(0  - 1) {}) 

i know trimend not char bit.

the code posted quite meaningless in context posted manipulated code found or made example?

to answer question:

  • trimend removes characters end of string
  • new char(x) creates array of characters removed, x specifies size of array
  • 0-1 specifies upper bound of array -1 - doesn't make sense array starts @ 0 , ends @ -1
  • {} initialises character array

Comments