File type
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-io' list.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.

Carlos Magalhaes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>File type</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi all,</FONT>
</P>

<P><FONT SIZE=3D2>I thought I could use GetType.FullName of the =
system.io.fileinfo namespace to retrieve the file type what can I use =
because its not working?</FONT></P>
<BR>

<P><FONT SIZE=3D2>Thank you </FONT>
<BR><FONT SIZE=3D2>Carlos</FONT>
</P>

</BODY>
</HTML>

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

Reply to this message...
 
    
Mitch Denny (VIP)
Carlos,

The GetType(...) method which exists on all object instances
is used to get a Type instance. This doesn't have anything to
do with a file-type I'm afraid, it has more to do with the
.NET type system and reflection capabilities.

What you are probably after is the "Extension" property on
the "FileInfo" instance.

----------------------------------------
- Mitch Denny
- Click here to reveal e-mail address
- +61 (414) 610-141
-

-----Original Message-----
From: Carlos Magalhaes [mailto:Click here to reveal e-mail address]
Sent: Monday, 3 June 2002 23:58
To: ngfx-io
Subject: [ngfx-io] File type

Hi all,
I thought I could use GetType.FullName of the system.io.fileinfo
namespace to retrieve the file type what can I use because its not
working?

Thank you
Carlos
| [ngfx-io] member Click here to reveal e-mail address = YOUR ID |
http://www.aspfriends.com/aspfriends/ngfx-io.asp = JOIN/QUIT
------------------------------------------------------------- This email
and any files transmitted are confidential and intended solely for the
use of the individual or entity to which they are addressed, whose
privacy should be respected. Any views or opinions are solely those of
the author and do not necessarily represent those of the Trencor Group,
or any of its representatives, unless specifically stated. Email
transmission cannot be guaranteed to be secure, error free or without
virus contamination. The sender therefore accepts no liability for any
errors or omissions in the contents of this message, nor for any virus
infection that might result from opening this message. Trencor is not
responsible in the event of any third party interception of this email.
If you have received this email in error please notify
Click here to reveal e-mail address For more information about Trencor, visit
www.trencor.net

Reply to this message...
 
    
Carlos Magalhaes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>RE: [ngfx-io] RE: File type</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi Mitch</FONT>
</P>

<P><FONT SIZE=3D2>This would only return the extension of the file and =
not the type though e.g. .doc or .xls etc can it not return =
application/msword I have seen some programs do it but obviously you =
can't see their code.</FONT></P>

<P><FONT SIZE=3D2>Any ideas?</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Mitch Denny [<A =
HREF=3D"mailto:Click here to reveal e-mail address">mailto:Click here to reveal e-mail address</=
A>] </FONT>
<BR><FONT SIZE=3D2>Sent: Tuesday, June 04, 2002 2:13 AM</FONT>
<BR><FONT SIZE=3D2>To: ngfx-io</FONT>
<BR><FONT SIZE=3D2>Subject: [ngfx-io] RE: File type</FONT>
</P>

<P><FONT SIZE=3D2>Carlos,</FONT>
</P>

<P><FONT SIZE=3D2>The GetType(...) method which exists on all object =
instances</FONT>
<BR><FONT SIZE=3D2>is used to get a Type instance. This doesn't have =
anything to</FONT>
<BR><FONT SIZE=3D2>do with a file-type I'm afraid, it has more to do =
with the</FONT>
<BR><FONT SIZE=3D2>.NET type system and reflection capabilities.</FONT>
</P>

<P><FONT SIZE=3D2>What you are probably after is the =
"Extension" property on</FONT>
<BR><FONT SIZE=3D2>the "FileInfo" instance.</FONT>
</P>

<P><FONT SIZE=3D2>----------------------------------------</FONT>
<BR><FONT SIZE=3D2>- Mitch Denny</FONT>
<BR><FONT SIZE=3D2>- Click here to reveal e-mail address</FONT>
<BR><FONT SIZE=3D2>- +61 (414) 610-141</FONT>
<BR><FONT SIZE=3D2>-</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Carlos Magalhaes [<A =
HREF=3D"mailto:Click here to reveal e-mail address">mailto:Click here to reveal e-mail address</A>] =
</FONT>
<BR><FONT SIZE=3D2>Sent: Monday, 3 June 2002 23:58</FONT>
<BR><FONT SIZE=3D2>To: ngfx-io</FONT>
<BR><FONT SIZE=3D2>Subject: [ngfx-io] File type</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Hi all, </FONT>
<BR><FONT SIZE=3D2>I thought I could use GetType.FullName of the =
system.io.fileinfo</FONT>
<BR><FONT SIZE=3D2>namespace to retrieve the file type what can I use =
because its not</FONT>
<BR><FONT SIZE=3D2>working?</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Thank you </FONT>
<BR><FONT SIZE=3D2>Carlos </FONT>
<BR><FONT SIZE=3D2>| [ngfx-io] member Click here to reveal e-mail address =3D YOUR =
ID |</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://www.aspfriends.com/aspfriends/ngfx-io.asp"" target="_blank">http://www.aspfriends.com/aspfriends/ngfx-io.asp"; =
TARGET=3D"_blank">http://www.aspfriends.com/aspfriends/ngfx-io.asp</A> =
=3D JOIN/QUIT</FONT>
<BR><FONT =
SIZE=3D2>------------------------------------------------------------- =
This email</FONT>
<BR><FONT SIZE=3D2>and any files transmitted are confidential and =
intended solely for the</FONT>
<BR><FONT SIZE=3D2>use of the individual or entity to which they are =
addressed, whose</FONT>
<BR><FONT SIZE=3D2>privacy should be respected. Any views or opinions =
are solely those of</FONT>
<BR><FONT SIZE=3D2>the author and do not necessarily represent those of =
the Trencor Group,</FONT>
<BR><FONT SIZE=3D2>or any of its representatives, unless specifically =
stated. Email</FONT>
<BR><FONT SIZE=3D2>transmission cannot be guaranteed to be secure, =
error free or without</FONT>
<BR><FONT SIZE=3D2>virus contamination. The sender therefore accepts no =
liability for any</FONT>
<BR><FONT SIZE=3D2>errors or omissions in the contents of this message, =
nor for any virus</FONT>
<BR><FONT SIZE=3D2>infection that might result from opening this =
message. Trencor is not</FONT>
<BR><FONT SIZE=3D2>responsible in the event of any third party =
interception of this email.</FONT>
<BR><FONT SIZE=3D2>If you have received this email in error please =
notify</FONT>
<BR><FONT SIZE=3D2>Click here to reveal e-mail address For more information about =
Trencor, visit</FONT>
<BR><FONT SIZE=3D2>www.trencor.net </FONT>
</P>
<BR>

<P><FONT SIZE=3D2>| [ngfx-io] member Click here to reveal e-mail address =3D YOUR =
ID</FONT>
<BR><FONT SIZE=3D2>| <A =
HREF=3D"http://www.aspfriends.com/aspfriends/ngfx-io.asp"" target="_blank">http://www.aspfriends.com/aspfriends/ngfx-io.asp"; =
TARGET=3D"_blank">http://www.aspfriends.com/aspfriends/ngfx-io.asp</A> =
=3D JOIN/QUIT</FONT>
</P>

</BODY>
</HTML>

-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.

Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.

If you have received this email in error please notify
Click here to reveal e-mail address For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>

Reply to this message...
 
 
System.IO.FileInfo




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com