C# asp.net error in Simulate.Mid(FileNameStr, SFilePosition);

I'm getting an error in the following line: Simulate.Mid(FileNameStr, SFilePosition);
of the code below: the error is: The name 'Simulate' does not exist in current context.

public string GetFileName(string FileNameStr, string GroupName)
        {
            string FileStr = null;
            string DocFileStr = null;
            Int32 FilePosition = 0;
            Int32 SFilePosition = 0;
            var SrchStr = "\\";

            //Get the filename only fromt eh FileNameString
            FilePosition = (FileNameStr ?? string.Empty).IndexOf(SrchStr) + 1;
            while (FilePosition > 0)
            {
                SFilePosition = FilePosition;
                FilePosition = (FileNameStr ?? string.Empty).IndexOf(SrchStr, FilePosition, System.StringComparison.OrdinalIgnoreCase) + 1;
            }
            FileStr = Simulate.Mid(FileNameStr, SFilePosition);
            //Merge with the document path and groupname
            //Set the full path
            if (GroupName == null || GroupName.Length == 0)
            {
                DocFileStr = FileStr; //DocFilePath & FileStr
                return DocFileStr;
            }
            else
            {
                DocFileStr = GroupName + FileStr; //DocFilePath & GroupName & FileStr
                return DocFileStr;
            }
        }
smares323Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Russ SuterCommented:
You haven't declared Simulate anywhere in your code block. The compiler has no idea what it is.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
smares323Author Commented:
How do i declare the Mid

  public static partial class Simulate
        {
           
        }
0
Russ SuterCommented:
Are you creating a class called Simulate? What does Mid do? What does it return? What else does the Simulate class do?

There's a big gap of information.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.