Solved

I want to Help vb convert to c#

Posted on 2007-11-14
2
151 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

773 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