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

  • Home
  • SEARCH
  • 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 6160301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:16:37+00:00 2026-05-23T21:16:37+00:00

I am building a Messenger class library. When logged in, you can access a

  • 0

I am building a Messenger class library. When logged in, you can access a collection of user objects list via msgrinstance.Users. These users have properties such as LoginName, FriendlyName, DisplayPicture.

If you try to access .Users after logging out, a NotLoggedInException is thrown. And for any user classes that were created while being logged in, if you try to access any of their properties you will again get a NotLoggedInException.

Is this a good way of doing things? Perhaps for the user properties I should be throwing an InvalidOperationException, as the user class is no longer linked with the main Messenger class?

  • 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-23T21:16:37+00:00Added an answer on May 23, 2026 at 9:16 pm

    Instead of adding control in any ptoperty I would add a control in a function that requests that information from object, or just clear user collection after app logged off.

    Or, if you just want for some reason have users list even after logoff, I would personally suggest to not throw an exception, but return some “invalid” value.

    EDIT:

    If a client holds just a refence of a User object it can not create problem, if not for GC collection, but it definitely can create a problem at a moment it decides to DO something with it, so call a function, so add error handling there, on your API access.

    Hope this helps.

    Regards.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a messenger library, and I have a question about how properly to
So I'm building an MSNP (windows live messenger) client. And I've got this list
Building a new Mobile Web Platform for Mobile Users to purchase & download content
Building a website that has English & Japanese speaking users, with the Japanese users
Building an NSCharacter set to restrict a UITextField for entering user names. I want
Building my baseclasses for user interface controls is getting there. I have command buttons
Building off Does Perl have an enumeration type? , how can I perform dynamic
I'm building a program similar to Messenger, sort of a chatting software. I created
Building an application to calculate metrics on Service Level Agreements. I have access to
i am building a voice messenger type application ... my server application is expected

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.