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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:11:50+00:00 2026-05-14T14:11:50+00:00

I am using NHunspell for checking spelling.I added NHunspell.dll as a reference to my

  • 0

I am using NHunspell for checking spelling.I added NHunspell.dll as a reference to my asp.net page.I added the namespace System.NHunspell.
The problem i am facing is related to IDisposible.
I put the downloaded code of NHunspell inside the button event.

protected void Button1_Click(object sender, EventArgs e)
{

        using (Hunspell hunspell = new Hunspell("en_us.aff", "en_us.dic"))
        {
            bool correct = hunspell.Spell("Recommendation");
            var suggestions = hunspell.Suggest("Recommendatio");
            foreach (string suggestion in suggestions)
            {
                Console.WriteLine("Suggestion is: " + suggestion);
            }
        }

        // Hyphen
        using (Hyphen hyphen = new Hyphen("hyph_en_us.dic"))
        {
            var hyphenated = hyphen.Hyphenate("Recommendation");
        }


*  using (MyThes thes = new MyThes("th_en_us_new.idx", "th_en_us_new.dat"))
        {
            using (Hunspell hunspell = new Hunspell("en_us.aff", "en_us.dic"))
            {
                ThesResult tr = thes.Lookup("cars", hunspell);
                foreach (ThesMeaning meaning in tr.Meanings)
                {
                    Console.WriteLine("  Meaning: " + meaning.Description);
                    foreach (string synonym in meaning.Synonyms)
                    {
                        Console.WriteLine("    Synonym: " + synonym);

                    }
                }
            }


        }

The * shown above is the line of error.The error is:
” type used in a using statement must be implicitly convertible to ‘System.IDisposable'”.

Also there is a warning on that line :”‘NHunspell.MyThes.MyThes(string, string)’ is obsolete: ‘idx File is not longer needed, MyThes works completely in memory'”;

Can any one help me to correct this???

ok, I changed that line to MyThes thes = new MyThes(“th_en_us_new.dat”); bug is gone.

But there is an exception “AFF File not found: E:\programfiles\visual studio\Common7\IDE\en_us.aff”. what i should do??

  • 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-14T14:11:50+00:00Added an answer on May 14, 2026 at 2:11 pm

    Did you try changing the line to:

    MyThes thes = new MyThes("th_en_us_new.dat");
    

    Have you done a search for the en_us.aff file on your C:\ drive? In your original zipped download of NHunspell, you should find this file. It might just be enough for you to copy that file into the E:\programfiles\visual studio\Common7\IDE\ directory.

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

Sidebar

Related Questions

I'm using NHunspell to check a string for spelling errors like so: var words
I have managed to incorporate spell checking into my C# project using NHunspell. What
using VB.Net2010 I need to call a C# DLL The problem I have is
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using mercurial, I've run into an odd problem where a line from one committer
Using Plone as a Document Management System for a Quality Management Program (capitalized buzzwords
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Linq; using System.ServiceProcess;
Using Google Maps InfoBox - http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/reference.html Currently the map will scroll - pan control
Using Java, how can I extract all the links from a given web page?
Using online interfaces to a version control system is a nice way to have

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.