1

I am getting file path using reflection in windows application but am not getting in Silverlight.

below code i have used :

IsolatedStorageFile store = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly, null, null);
IsolatedStorageFileStream stream  =  new IsolatedStorageFileStream("Text.log", FileMode.Create, store);         
// Retrieve the actual path of the file using reflection.
string path = stream.GetType().GetField("m_FullPath", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(stream).ToString();

Silverlight does not support private, protected and internal (outside the assembly) reflection

Let me know how can i get file path in silverlight.

4

0 回答 0