class and member layouts but not within method bodies. Join Stack Overflow to learn, share knowledge, and build your career. Text/html 9/9/2014 2:30:05 PM CoolDadTx 0 In that case you can eliminate the custom type (although I think you're going to eventually want to go that route). Question text/sourcefragment 9/9/2014 1:43:33 PM GAMinTN.
The only difference would be your calling syntax: /using an array numbersI /using a dictionary tValue(I) The issue, in my opinion, isn't with the array. . I i 1, end While ose ose i have tried to create the, c# equivalent to this code and nothing seems to work. Text/sourcefragment 9/9/2014 5:41:05 PM GAMinTN 0 I stepped away from this problem for a little bit and had an idea. . As CoolDadTx indicated this is not language specific so taking time to work through this as suggested is well worth the time and effort you put into this for this task and other task down the road. ExecuteScalar up vote 18 down vote, sqlConnection conn new conn.
Answers text/sourcefragment 9/9/2014 5:41:05 PM GAMinTN. Rather than loading the data when the app starts you should probably load it when it is first needed (unless startup time is less important than run time). Public class CountryRepository /Or use arrays as specified earlier public IEnumerable Country GetAll / Get data public class CountryService public IEnumerable Country GetCountries /Look up in Cache /If not found then query repository and /store in cache. ExecuteReader while (ad numberi Int32(dr0 itemsi String(dr1. Youll get converting errors with mmandText "select count from table_name Int32 count (Int32) cmd. Even the internal connection classes seem to pass objects rather than boiling them binary options industry down to strings, for example: internal abstract void AddPreparedCommand sqlCommand cmd Declaring Type: System. Personally I think this is a excellent opportunity in regards to thinking how to complete this task. All replies text/sourcefragment 9/9/2014 2:13:50 PM CoolDadTx. While ad number(i) dr(0) items(i) dr(1). I'm sure somebody here knows a way to get. HasRows) while (ad numbersi tInt32(0 itemsi tString(1 i 1; ose Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.