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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:56:04+00:00 2026-06-18T07:56:04+00:00

I tried to ask a question yesterday but it was seemingly too vague. Here’s

  • 0

I tried to ask a question yesterday but it was seemingly too vague. Here’s another try.

In the past, I have used some winforms/VB.Net classes with functionality for, say, working on text strings, for file operations, or for database handling, like clsStrings, clsIO and clsDB. The idea was that these classes did everything related to the subject, so that clsStrings would have a method called “filterString”, removeCertainChars” etc.

In the old winforms application, I simply wrote Imports clsStrings when I needed to access a method. Throughout the .vb file, I could then write something like

str = filterString(TextBox1.Text)

I now try to get the same functionality in a new winforms app in C#. The only thing I get to work is creating a variable for the class:

clsStrings clsstrings = New clsStrings();

…and then later in the code:

str = clsstrings.filterString(TextBox1.Text);

So I guess what I would want is the ability to use a using statement for these “helper classes” (is there a better word for them?) so that I wouldn’t have to write the variable name all the time. (Just like when Intellisense discovers that a namespace is missing and asks if I want to have a using statement for, say, System.Data so I can write “DataTable” instead of having to write “Data.Datatable” all the time.)

I suspect I would need to put these class files in a separate folder or so, but that would be totally fine. I just want some structure to my app.

I hope this is clearer.

Thanks for any input!

  • 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-06-18T07:56:05+00:00Added an answer on June 18, 2026 at 7:56 am

    Well, the difference is that now you are working with OOP principles.

    What you could do to be closer to what you were used to is to build static classes for the helper class, maybe even turn them into extension methods.

    Example:

    public static class ClsStrings
    {
    
     public static string FilterString(this string stringToFilter) { return something; }
    
    }
    

    Then you could call it like this:

    string filteredString = TextBox1.Text.filterString();
    

    or

    string filteredString = ClsStrings.filterString(TextBox1.Text);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried again to ask the same question , but I ended up
I tried to ask this question yesterday, but I don't think my wording was
I tried to ask this question before but I guess I didnt explain myself
Well, I tried to ask this question as a comment on this question, but
Sorry to ask this question again but I tried several solutions on stackoverflow and
First, I've tried to ask the similar question yesterday ( NHibernate many-to-many relationship question:
I tried to ask this question earlier, but I was unclear in my question.
I have an button just as have Ask Question on SO and here is
I have tried to ask a variant of this question before. I got some
I think I tried to ask for far too much in my previous question

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.