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 1016109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:30:02+00:00 2026-05-16T10:30:02+00:00

i am using the common file dialog . i think there will be many

  • 0

i am using the common file dialog. i think there will be many things i need to know and validate eg. file type, file exists, not enough memory etc.

for file type, can i limit file types that can be opened using open file dialog? filter seems to still allow the user to type in a file with a different filetype. must i validate in code?

can i say that just by setting CheckFileExists = True, i should not need to check again in code the file exists?

is there a need to validate if there is a OutOfMemoryException? i am thinking, if all i should be opening is small files, i can get away with not handling that? not a good practice i guess?

are there any others i missed out?

  • 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-16T10:30:02+00:00Added an answer on May 16, 2026 at 10:30 am

    Yes, you need to validate that a file selected with OpenFileDialog exists and is of correct type as these cannot be enforced. As far as OutOfMemoryException is concerned I am afraid there’s no reliable way to test if it will occur. Even if you try to see available memory and verify that this number is greater than the file size an exception could still occur later when you try to read the file because the garbage collector or some other process might have changed this.

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

Sidebar

Related Questions

I know I can include Python code from a common file using import MyModuleName
I'm trying to read the contents of a small text file using the common
I am trying to upload a file using commons-fileupload-1.1.1.jar file (I know it is
i have several controllers which will all be using common functionality. So i have
Is there a way to create a directory using common lisp. I want to
I have a main conf file which I load using apache common configuration class.
I am using Apache Commons IO FileUtils utility to read a file into a
I am processing an xml file using apache.commons.digester The xml is, for instance, structured
What is the easiest way using common linux tools to check if a bunch
I'd like to be able to define lambdas using common Lisp syntax, in Clojure.

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.