Solved

I want to Help vb convert to c#

Posted on 2007-11-14
2
161 Views
Last Modified: 2010-04-15
Sub CheckVerbose()
    verbose = False
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set propFile = oFSO.OpenTextFile(App.Path & "\sfa.properties", 1)
    propFile.SkipLine
    propFile.SkipLine
    strverbose = propFile.ReadLine
    mypos = InStr(1, strverbose, "=", 1)
    verbose = Mid(strverbose, mypos + 1, Len(strverbose) - mypos)
    If verbose <> "" Or verbose = "true" Then
             verbose = True
    End If
    propFile.Close
    Set propFile = Nothing
    Set oFSO = Nothing
End Sub
0
Comment
Question by:sitg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 500 total points
ID: 20287016
           public void CheckVerbose()
            {
                  System.IO.StreamReader ss = new System.IO.StreamReader("path");
                  ss.ReadLine();
                  ss.ReadLine();
                  string strverbose = ss.ReadLine();
                  int myPos = str.IndexOf("=");
                  object verbose = strverbose.Substring
                        (myPos+1,strverbose.Length - myPos);
                  if(verbose.ToString() != "" || verbose.ToString() == "true")
                  {
                        verbose = true;
                  }
                  ss.Close();
                  ss = null;
            }
0
 

Author Comment

by:sitg
ID: 20287156
Thanks Sir
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question