0

I found this answer for C#

C# getting file names without extensions

which uses Path.GetFileNameWithoutExtension(fi.Name), but it doesn't work for Silverlight. Intellisense doesn't recognize it.

Community
  • 1
  • 1
Brad Boyce
  • 1,248
  • 1
  • 17
  • 34

1 Answers1

3

According to the documentation, Path.GetFileNameWithoutExtension() is supported in Silverlight 3 and 4. Make sure you have imported System.IO or used:

... = System.IO.Path.GetFileNameWithoutExtension(fi.Name);
Evan Mulawski
  • 54,662
  • 15
  • 117
  • 144
  • I can be so lame sometimes. I SWEAR it didn't work before. I'll mark this as answer as soon as it lets me. – Brad Boyce Aug 22 '11 at 17:30
  • @Brad Boyce: If you hover over the unknown class, a small rectangle should appear below it. Click that, an you can automatically import the reference needed. – Evan Mulawski Aug 22 '11 at 17:35
  • Thanks Evan, I actually had the using in there - not sure what was going on. But I do appreciate the help. – Brad Boyce Aug 22 '11 at 17:46