Solved

I want to Help vb convert to c#

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now