-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest_Int.cs
More file actions
53 lines (39 loc) · 1.15 KB
/
Test_Int.cs
File metadata and controls
53 lines (39 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace chapter7._5
{
class Test_Int
{
public void Test()
{
//test int
Vector<int> v = new Vector<int>();
int[] arr = new int[5] { 10, 20, 30, 40, 50 };
v.push_back(1);
v.push_back(2);
v.push_back(3);
v.push_back(4);
v.push_back(5);
v.push_back(6);
v.addRange(3, arr); //2020-05-05
v.ToString();
Console.WriteLine("\n ---range test---");
v.addRange(50, arr); //2020-05-05 //out of range
v.ToString();
v.pop_back();
v.pop_back();
v.ToString();
v.removeAt(1);
v.ToString();
v.insertAt(1, 100); //2020-05-05
Console.WriteLine("\n ---range test---");
v.insertAt(9, 100); //2020-05-05 //out of range
v.clear();
v.ToString();
v.pop_back();
}
}
}