using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MyGenericList { public class MyGenericList where T : IComparable { const int defaultCapacity = 6; private T[] list = null; public MyGenericList(int capacity = defaultCapacity) { this.Count = 0; this.Capacity = capacity; list = new T[capacity]; } private int capacity; public int Capacity { get { return capacity; } private set { capacity = value; } } private int count; public int Count { get { return count; } set { count = value; } } public void Add(T item) { this.Count++; this.Resize(this.Count); list[count - 1] = item; } public void RemoveAt(int index) { if (index > Count || index < 0) { throw new IndexOutOfRangeException("Index is out of range."); } this.Count--; this.Resize(this.Count); Array.Copy(this.list, index, this.list, index--, this.Count - index); this.list[count] = default(T); } public void Insert(int index, T element) { if (index > Count || index < 0) { throw new IndexOutOfRangeException("Index is out of range."); } this.Count++; this.Resize(this.Count); Array.Copy(this.list, index, this.list, index++, this.Count - index -1); this.list[index - 1] = element; } public int FindIndex(T item) { return Array.IndexOf(this.list, item); } public bool Contains(T item) { return this.list.Contains(item); } public void Clear() { this.Count = 0; this.Capacity = defaultCapacity; this.list = new T[Capacity]; } private void Resize(int currentCounter) { if (currentCounter > this.Capacity) { this.Capacity = this.Capacity * 2; Array.Resize(ref this.list, this.Capacity); } } } }
canlı sex hattı
ReplyDeletesalt likit
heets
arkadaşlık sitesi
0WSNJL
dijital kartvizit
ReplyDeletereferans kimliği nedir
binance referans kodu
referans kimliği nedir
bitcoin nasıl alınır
3B36C
şişli
ReplyDeleteavcılar
sakarya
elazığ
bursa
6Z8
kuşadası
ReplyDeletemilas
çeşme
bağcılar
zonguldak
T3X0İP
شركة مكافحة الفئران بالاحساء 8rzXNW4iyv
ReplyDeleteAppreciate this detailed guide on brand profiles and logos. I’ve seen too many startups fail because their "simple" logo didn't resonate with their actual target demographic. The key to avoiding this is moving from intuition to a data-driven design process. By analyzing audience metrics, you can ensure your fonts and colors truly speak to your buyers. For marketing professionals wanting to master this analytical approach, the Job Oriented Data Analytics Training Electronic City provides hands-on training in visualization and web analytics, perfectly complementing your branding strategy.
ReplyDelete