c# - Get array starting with offset -


I am using C #, and it is annoying that I can start from a certain point like C ++

Consider this code:

  int [] array = new int [32]; Foboar (array + 4); // Send the starting ARM from the 4th location  

This is a strange syntax for C # because we do not have any useful sign, but is definitely a way to do this? Is there. Skip (), but I think it produces a new array, which I do not like.

What are my options?

You can assign it to a IEnumerable & lt; Int & gt; as an array. You can leave it again and this eater will be removed from the number of elements only. In this way, you will not need to use ToArray () and copy the part of the array in question. Of course, IEnumerable may not be suitable for what you want to do, but it is difficult to tell from your question. Public void FooBar (IEnumerable & lt; int & gt; times) {...} int [] array = new int [32]; Fubar (array Skip (4));


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -