The above poster should have answered your question, but since you're
coming from a C background, I would like to make note that C# doesn't
use pointers per se, it uses references. While similar, they aren't
the same thing, and the naming scheme for C#, using PTR at the end of
your variables is not necessary and slightly redundant.

Hungarian notation has been out since the invention of intellisense
and it's other IDE varieties.

Unless of course you're using VB.NET, where parameters and properties
of the same name might need a prefix...my company uses c(Variable) for
the class field, (Variable) for the property, p(Variable) for
parameters, and l(Variable) for local variables of similar name.

On Jul 24, 7:06 am, Le Tubs <[email protected]> wrote:
> Hi
>
> I have been playing around with Visual c# and I'm trying to work out
> whether its me or c# (I'm from a c background btw). Have created a
> simple little program to read the contents of a file in ....
> Now I have found something rather strange (the files do exist in
> these
> locations) if I use this line in the code stub below ...
>
>    FileStream filePTR = new FileStream("C:\\findme.txt",
> FileMode.Open, FileAccess.Read);
>
> It works...
>
> Yet If I use this line
>
>     FileStream filePTR = new FileStream("C:\\Dr1\\Dr2\\findme.txt",
> FileMode.Open, FileAccess.Read);
>
> it doesn't. So am I wondering is it me or am I missing something
> fundermental?. Thanks in advance for time and consideration, btw does
> c# have a sleep command?or do you just use the
> for( int i = 1; i ,= 1000000 ; i++ ){}.
>
> Thanks in advance for your time on this question.
>
> Le Tubs
>
> string line;
>             //Pass the file path and file name to the FileStream
> constructor
>            ** FileStream filePTR = new FileStream("C:\\Dr1\
> \findme.txt", FileMode.Open, FileAccess.Read);
>             StreamReader sr = new StreamReader(filePTR);
>             //Read the first line of text
>             line = sr.ReadLine();
>             Console.WriteLine(" ... {0} ", line);
>             sr.Close();

Reply via email to