Can apple ArrayList in string[]
-
public ArrayList strline=new ArrayList(); strline.Add("I found a reason for me. To change who I used to be. A reason to start over new. And the reason is you."); strline.Add("Anger dwells only in the bosom of fools - John F. Kennedy."); I hoped this could be work. but it didn't. I want to replace string[] with readed Line by Line in txt file. and I know how to read line by line but string[] Length is fixed as initial. so I tried apple ArrayList in string[] but it's not easy to me. How can we treat this? Help me please. Image will remind us some feelings and if I can ask someone about a problem, that's not a bad life.
-
public ArrayList strline=new ArrayList(); strline.Add("I found a reason for me. To change who I used to be. A reason to start over new. And the reason is you."); strline.Add("Anger dwells only in the bosom of fools - John F. Kennedy."); I hoped this could be work. but it didn't. I want to replace string[] with readed Line by Line in txt file. and I know how to read line by line but string[] Length is fixed as initial. so I tried apple ArrayList in string[] but it's not easy to me. How can we treat this? Help me please. Image will remind us some feelings and if I can ask someone about a problem, that's not a bad life.
Try using System.Collections.Specialized.StringCollection instead. Otherwise you can just returned objects from the ArrayList to string manually, string myStr = (string)myArrayList[0]; Does that answer your question? Judah Himango