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 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

There's a common way to store multiple values in one variable, by using a
What is the easiest way using common linux tools to check if a bunch
A common argument against using .NET for high volume, transactional enterprise systems is that
A common scenario when using source control is to have a development branch along
It's common knowledge that using System.Diagnostics.Process.Start is the way to launch a url from
In the code below I am using a recursive CTE(Common Table Expression) in SQL
When I enable common control visual style support (InitCommonControls()) and I am using any
What are some common , real world examples of using the Builder Pattern? What
I have a .net project (MySolution.Common) that uses the app.config. I am using the
Using Apache's commons-httpclient for Java, what's the best way to add query parameters to

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.