TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Maha
NA
0
325.3k
ArrayList
Nov 14 2013 8:59 AM
Console.WriteLine(alDemo.Add("Four")); is giving number of alDemo.Add() count. Please explain the reason. Problem is highlighted.
using System;
using System.Collections;
class ArrayListProgram
{
static void Main(string[] args)
{
ArrayList alDemo = new ArrayList();
alDemo.Add("One");
alDemo.Add("Two");
alDemo.Add("Three");
alDemo.Add(1);
alDemo.Add(true);
alDemo.Add(10.01);
Console.WriteLine(alDemo.Add("Four"));
alDemo.Add("Five");
alDemo.Add("Six");
alDemo.Insert(3, "Seven");
alDemo.RemoveAt(2);
alDemo.Remove("Five");
//alDemo.Sort();
//alDemo.Reverse();
foreach (Object item in alDemo)
{
Console.WriteLine(item);
}
Console.Read();
}
}
Reply
Answers (
2
)
C# Single slash and double slash
I need help with the C# codes for my project