예제 #1
0
        static void Main(string[] args)
        {
            var list = new Arraylist();

            list.Add(1);
            list.Add("Mosh");
            list.Add(DateTime.Today);

            // var number = (int) list[1];
            var anotherList = new List <int>();
            var names       = new List <string>();

            names.Add();

            // Console.WriteLine("Hello World!");
        }
예제 #2
0
파일: Message.cs 프로젝트: Klotz95/OpenChat
        public void AddContent(byte[] content, bool fromMe)
        {
            string current;

            //is this pic from me?
            if (fromMe)
            {
                current = "M:"
            }
            else
            {
                current = "P:"
            }
            //now look for the lenght of the Picturearray and put in the right Placeholder
            current += "{" + Content.Length.ToString() + "}"
                       //save it into the ChatHistory
                       string[] backup = ChatHistory;
            ChatHistory = new string[backup.Length + 1]
                          for (int i = 0; i < backup.Length; i++)
            {
                ChatHistory[i] = backup[i];
            }
            ChatHistory[backup.Length] = current;
            //save the content
            Content.Add(content);
        }
예제 #3
0
 public clsSentence(Arraylist temp)
 {
     foreach (clsFoundTerm term in temp)
     {
         terms.Add(term);
     }
 }
    void HandleChildAdded(object sender, ChildChangedEventArgs args)
    {
        if (args.DatabaseError != null)
        {
            Debug.LogError(args.DatabaseError.Message);
            return;
        }

        string lat, lng, file = Syetem.String.Empty;

        string[] tempList;

        // Do something with the data in args.Snapshot
        if (args.Snapshot != null && args.Snapshot.ChildrenCount > 0)
        {
            foreach (var childSnapshot in args.Snapshot.Children)
            {
                if (childSnapshot.Child("audio") == null ||
                    childSnapshot.Child("audio").Value == null)
                {
                    Debug.LogError("Bad data in sample.");
                    break;
                }
                else
                {
                    Debug.Log("entry : " +
                              childSnapshot.Value.ToString() + " - " +
                              childSnapshot.Child("audio").Value.ToString());

                    // generate a data list

                    tempList = childSnapshot.Value.ToString().Split(' ');
                    lat      = tempList[0].Replace('_', '.');
                    lng      = tempList[1].Replace('_', '.');
                    file     = childSnapshot.Child("audio").Value.ToString();

                    data = new DataClass(lat, lng, file);
                    storedList.Add(data);

                    //leaderBoard.Insert(1, childSnapshot.Child("audio").Value.ToString()
                    //  + "  " + childSnapshot.Child("email").Value.ToString());
                }
            }
        }
    }