Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 942311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:15:06+00:00 2026-05-15T22:15:06+00:00

I am adding functionality to an existing .Net collection. In order to do this,

  • 0

I am adding functionality to an existing .Net collection. In order to do this, I am overriding several functions. I have not been able to override the return value of the basic array return in the collection. For example, if I call emailMessage.To[i], it does not return the proper value, but if I call emailMessage.Item(i), it returns the correct value. Below is the code from my class. What do I need to override to correct the first error?

namespace EmailService
{
    public class MailAddressCollection : System.Net.Mail.MailAddressCollection
    {
        public MailAddressCollection() : base()
        {
        }

        public void Add(MailAddress Address)
        {
             base.Add(Address);
        }

        public MailAddress Item(int index)
        {
            return (MailAddress)(base.Items[index]);
        }

    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:15:06+00:00Added an answer on May 15, 2026 at 10:15 pm
    public MailAddress this[int index] 
    {
       get { return ((MailAddress)(base.Items[index]); }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having trouble adding ajax functionality to existing asp.net 4 website. I have
I have been given the task of adding functionality to an existing IIS 6.0
I wanted to have a method of adding functionality to pre-existing functions, so I
At work I have been tasked with adding additional functionality to an existing MVC
I've been tasked with adding functionality to an existing ASP.net Form Application. Users are
I'm adding some functionality to an existing code base that uses pure C functions
I'm adding copy and paste functionality to an existing Windows application. This MSDN page
I'm adding functionality to an existing Cocoa application written mostly in Objective-C. I have
I'm adding some functionality to an existing 'popup' in an ASP.NET website. The popup
I'm adding functionality to an existing Java application that's already been deployed extensively. (So

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.