Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InternetAddressList does not allow insert at end #559

Closed
bradlis7 opened this issue Apr 22, 2020 · 2 comments
Closed

InternetAddressList does not allow insert at end #559

bradlis7 opened this issue Apr 22, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@bradlis7
Copy link

Describe the bug
When attempting to insert at the end of an InternetAddressList, it returns argument out of range. It is allowed in List<> implementation.

Platform (please complete the following information):

  • OS: Windows
  • .NET Runtime: CoreCLR
  • .NET Framework: .NET Core 3.1
  • MailKit Version: 2.4.1

To Reproduce

Code Examples

// Failures
var to = new InternetAddressList();
to.Add(new MailboxAddress("[email protected]"));
to.Insert(1, new MailboxAddress("[email protected]"));
to = new InternetAddressList();
to.Insert(0, new MailboxAddress("[email protected]"));

// This works
to = new InternetAddressList();
to.Add(new MailboxAddress("[email protected]"));
to.Insert(0, new MailboxAddress("[email protected]"));

Expected behavior
If I insert at the current count, it should act like Add.

Screenshots
N/A

Additional context
N/A

@bradlis7 bradlis7 changed the title Insert at End Fails InternetAddressList does not allow insert at end Apr 22, 2020
@jstedfast jstedfast transferred this issue from jstedfast/MailKit Apr 22, 2020
@jstedfast jstedfast added the bug Something isn't working label Apr 22, 2020
@jstedfast
Copy link
Owner

Thanks for the bug report!

@bradlis7
Copy link
Author

That was fast :). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants