In need of some basic help

  • Thread starter Meek dba Tangentals Design
  • Start date
M

Meek dba Tangentals Design

Hi all,
I'm running VS 2008 with the latest Oxygene language module from
RemObjects allowing me to write .NET 3.5 apps in Pascal. It's a great
system especially when coming from 15 years of Delphi! <g> But, and I'm
told by others this is a problems everyone is having no matter what
language is being used, I have ONE single problem that I despartly need
to find a solution to!
I've been using "Reflector" to browse through the NET libraries and
there are literally thousands of entries under a variety of cryptic
headings, and it seems when I need to find a method, procedure,
function, property, etc for use in my code, finding it takes longer than
writing the entire application!
For example, right now I'm looking for CRC functions that I can use as
part of my new security protocols. In Win32 I used a Turbopower library
called Systools which had a function, "CrC32ofFile(FFile : String):
String;". Give it a path and filename and it returned a String of
numbers that could then be encrypted and used to validate that a file's
code hadn't been tampered with by re-checking the same file using the
same function and comparing the result with the decrypted stored result.
But how do I find something like this in NET? And the same question
applies to all kinds of needs, from simple ones like finding a way to
get the Drive Windows is installed under to getting info like the
current logged on Username, or aq DirectoryExixts function!
It seems there has to be a way of simplifying the finding of these
basic needs rather than having to go entry to entry with Reflector which
can take literally days!
Is there any kind of documentation or index I can used to help narrow
down my searches? Please if anyone has any ideas of how to spend more
time coding then looking for the methods and such to use in my code, I
will be forever gratful!
 
J

Jon Skeet [C# MVP]

Meek dba Tangentals Design said:
I'm running VS 2008 with the latest Oxygene language module from
RemObjects allowing me to write .NET 3.5 apps in Pascal. It's a great
system especially when coming from 15 years of Delphi! <g> But, and I'm
told by others this is a problems everyone is having no matter what
language is being used, I have ONE single problem that I despartly need
to find a solution to!
I've been using "Reflector" to browse through the NET libraries and
there are literally thousands of entries under a variety of cryptic
headings, and it seems when I need to find a method, procedure,
function, property, etc for use in my code, finding it takes longer than
writing the entire application!

Using Reflector is certainly not the best way of exploring the .NET
framework. MSDN is a much better way. (Reflector's great for looking at
implementation details.)
For example, right now I'm looking for CRC functions that I can use as
part of my new security protocols. In Win32 I used a Turbopower library
called Systools which had a function, "CrC32ofFile(FFile : String):
String;". Give it a path and filename and it returned a String of
numbers that could then be encrypted and used to validate that a file's
code hadn't been tampered with by re-checking the same file using the
same function and comparing the result with the decrypted stored result.

Use members of the System.Security.Cryptography namespace. I'd suggest
a hash such as MD5 or SHA-1 (neither of those are secure against
deliberate tampering, but then neither is CRC).
But how do I find something like this in NET? And the same question
applies to all kinds of needs, from simple ones like finding a way to
get the Drive Windows is installed under to getting info like the
current logged on Username, or aq DirectoryExixts function!

Environment.GetFolderPath is probably best for the first;
Thread.CurrentPrincipal is probably okay for the second (I expect there
are multiple options though) and Directory.Exists for the third.

Even with MSDN it can still take time to find things, but it'll be a
lot faster than using Reflector.
It seems there has to be a way of simplifying the finding of these
basic needs rather than having to go entry to entry with Reflector which
can take literally days!
Is there any kind of documentation or index I can used to help narrow
down my searches? Please if anyone has any ideas of how to spend more
time coding then looking for the methods and such to use in my code, I
will be forever gratful!

As I say, MSDN is your friend. When you installed VS2008 it should have
given you the option of installing it.
 
J

Jack Jackson

As I say, MSDN is your friend. When you installed VS2008 it should have
given you the option of installing it.

Google can be very helpful too, as it finds information from other
sources (some good, some dubious and some outright wrong) as well as
links to MSDN.
 
M

Meek dba Tangentals Design

Jon said:
Using Reflector is certainly not the best way of exploring the .NET
framework. MSDN is a much better way. (Reflector's great for looking at
implementation details.)


Use members of the System.Security.Cryptography namespace. I'd suggest
a hash such as MD5 or SHA-1 (neither of those are secure against
deliberate tampering, but then neither is CRC).


Environment.GetFolderPath is probably best for the first;
Thread.CurrentPrincipal is probably okay for the second (I expect there
are multiple options though) and Directory.Exists for the third.

Even with MSDN it can still take time to find things, but it'll be a
lot faster than using Reflector.


As I say, MSDN is your friend. When you installed VS2008 it should have
given you the option of installing it.


Thanx much for your help! I cannot afford to be a MSDN member, but I
do use it from the developer center on-line. But I think the biggest
problem is because you have to almost hit a keyword when you search.
And having no knowledge of what many things are called now, my searches
come up empty! For example, your suggestion of "CurrentPrinciple". I
never would have searched for the current username methods using such a
term! <g> So I have one finaly question. When I get stuck, what group
and/or forum is the best to try for help in NET when it's needed?
 
J

Jack Jackson

Thanx much for your help! I cannot afford to be a MSDN member, but I
do use it from the developer center on-line. But I think the biggest
problem is because you have to almost hit a keyword when you search.
And having no knowledge of what many things are called now, my searches
come up empty! For example, your suggestion of "CurrentPrinciple". I
never would have searched for the current username methods using such a
term! <g> So I have one finaly question. When I get stuck, what group
and/or forum is the best to try for help in NET when it's needed?

If you know the class, Googling for: .NET xxx class
will usually find the MSDN documentation for the class. Then look
through the members of the class to see which methods/properties have
names that look like they may be what you need.

If I don't know the class then I usually Google for various terms,
like "encryption", "crypto" etc. and see what shows up. With a search
like this you can often find code examples.
 
J

Jon Skeet [C# MVP]

Meek dba Tangentals Design said:
Thanx much for your help! I cannot afford to be a MSDN member, but I
do use it from the developer center on-line.

You don't need to be an MSDN subscriber. If you've installed Visual
Studio, you can install the MSDN library. The version of the library
which is available with the Express editions is somewhat cut down, but
better than nothing.

Which version of VS2008 have you got installed?
But I think the biggest
problem is because you have to almost hit a keyword when you search.
And having no knowledge of what many things are called now, my searches
come up empty! For example, your suggestion of "CurrentPrinciple". I
never would have searched for the current username methods using such a
term! <g> So I have one finaly question. When I get stuck, what group
and/or forum is the best to try for help in NET when it's needed?

This one's perfectly reasonable.
 
M

Meek dba Tangentals Design

Jon said:
You don't need to be an MSDN subscriber. If you've installed Visual
Studio, you can install the MSDN library. The version of the library
which is available with the Express editions is somewhat cut down, but
better than nothing.

Which version of VS2008 have you got installed?


This one's perfectly reasonable.

I guess this is what might be considered an Express Version although I
wasn't asked during installation if I wanted to install MSDN. It's the
VS 2008 IDE with Oxygene, ( formerly Chrome ), which allows one to work
in Object Pascal.
 
P

Pavel Minaev

Jon Skeet [C# MVP] wrote:


You don't need to be an MSDN subscriber. If you've installed Visual
Studio, you can install the MSDN library. The version of the library
which is available with the Express editions is somewhat cut down, but
better than nothing.
Which version of VS2008 have you got installed?
This one's perfectly reasonable.

I guess this is what might be considered an Express Version although I
wasn't asked during installation if I wanted to install MSDN. It's the
VS 2008 IDE with Oxygene, ( formerly Chrome ), which allows one to work
in Object Pascal.

That would be VS2008 Shell, then.

In practice, I've found that having a local MSDN copy is immensely
useful. I highly recommend you to download MSDN Express from
http://www.microsoft.com/express/download/msdn/Default.aspx and use
its index to search for things you need. Alternatively, you might be
able to afford Visual Studio 2008 Standard, which comes with a more
complete version of MSDN.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top