2
Answers

Non exceptional case, array out of bounds

Soumita  Parui

Soumita Parui

11y
999
1

I understand that what I'm trying to do is a bit of a hack, but it's interesting nonetheless.

I'm in a situation where it is quite possible that an array might not have as many items as I expect.

Here's the concept:

namespace TESTAPP {     class Program     {         static void Main(string[] args)         {             string derp = "foooooo";             //The split is important, you might not have the character there to split by             Writer(derp.Split('x')[0] ?? ".");             Writer(derp.Split('x')[1] ?? ".");         }          private static void Writer(string writeme)         {             Console.WriteLine(writeme ?? "..");         }     } }
C#
Answers (2)
0
Govinda Rajulu Yemineni

Govinda Rajulu Yemineni

NA 1.5k 233.1k 9y
Hi Amit,
 
please refer the following URL
 
http://forums.asp.net/t/1787686.aspx?How+to+post+a+xml+value+to+web+api+ 
0
Amit Joshi

Amit Joshi

NA 100 11k 9y
Any reference links?