Try adding square brackets after new MyClass and a semi-colon at the end
MyClass[] testobjlist = new MyClass[] { new MyClass(1001,1234,"Text 1", "abcdefghijklm", "ding"), new MyClass(1002,2345,"Text xx", "bla bla", "dong"), new MyClass(1003,8653,"Text yy", "blah blah even more", "bamm!") };
Related Posts:
- Error : Index was outside the bounds of the array.
- All possible array initialization syntaxes
- Adding values to a C# array
- Adding values to a C# array
- C# equivalent of C++ map
- How to convert byte array to string [duplicate]
- How to convert byte array to string
- Adding values to a C# array
- Adding values to a C# array
- Reading CSV file and storing values into an array
- How to do constructor chaining in C#
- Remove element of a regular array
- Merging two arrays in .NET
- Checking if a string array contains a value, and if so, getting its position
- How to add a string to a string[] array? There’s no .Add function
- Constructor of an abstract class in C#
- How to convert UTF-8 byte[] to string
- How do I concatenate two arrays in C#?
- Best way to “push” into C# array
- Convert an array to string
- Key Value Pair List
- Convert HTML to PDF in .NET
- How to show a loading gif while an APi is being called in xamarin android?
- C# HttpClient An existing connection was forcibly closed by the remote host
- IOException: The process cannot access the file ‘file path’ because it is being used by another process
- No connection could be made because the target machine actively refused it?
- What does a lock statement do under the hood?
- What is C# equivalent of
- ASP.NET 5 MVC: unable to connect to web server ‘IIS Express’
- Why is this code throwing an InvalidOperationException?
- How to add a default Default.aspx to a ASP.NET Web Application Project?
- Error 1053 the service did not respond to the start or control request in a timely fashion
- Regex for numbers only
- Double array initialization in Java
- Access to the path is denied
- What does question mark and dot operator ?. mean in C# 6.0?
- How to jump in Unity 3d?
- ToList().ForEach in Linq
- Convert a list of strings to a single string
- Proper way to initialize a C# dictionary with values
- Get dictionary value by key
- ..The underlying connection was closed: An unexpected error occurred on a receive
- Select distinct using linq
- What are Virtual Methods?
- Invalid URI: The format of the URI could not be determined
- Unity “The associated script can not be loaded” and “Win32Exception: The system cannot find the file specified”
- Convert Linq Query Result to Dictionary
- Get single value from dictionary by key
- What is the difference between “@Scripts.Render” and “
Recommended Hostings
Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.
FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.