HI, I have to answer the following question immediately for a tech exam and was wondering if anyone could help:

Write a pair of functions to encode and decode a record consisting of a variable number of (name, value) fields, represented as a two-dimensional array of strings, to-and-from a single string representation.

The first dimension of the array should contain the name of the field and the second dimension the value of the field. For example, a record with three fields “id”, “name” and “salary” with respective values “123”, “bob” and “30000” would be represented by the following array:

Index 0 1
0 “id” “123”
1 “name” “bob”
2 “salary” “30000”

The single string representation should be encoded by separating the field name from the field value using an = character, and by separating (field, value) pairs with a # character, e.g.


We don't answer exams!!
But what I can do is to guide you to look at System.String and System.Text namespace...