Solved

I want to Help vb convert to c#

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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 …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

760 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

19 Experts available now in Live!

Get 1:1 Help Now