首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

无法将类型为“System.IO.UnmanagedMemoryStream”的对象强制转换为类型“System.IO.MemoryStream”。该怎么处理

2012-03-18 
无法将类型为“System.IO.UnmanagedMemoryStream”的对象强制转换为类型“System.IO.MemoryStream”。/// summ

无法将类型为“System.IO.UnmanagedMemoryStream”的对象强制转换为类型“System.IO.MemoryStream”。
/// <summary>
  /// Creates a new AlphaImage from the given resource name.
  /// <example>
  /// AlphaImage image = AlphaImage.CreateFromResource("AlphaMobileControls.TestApp.Resources.Wallpaper.jpg");
  /// </example>
  /// </summary>
  public static AlphaImage CreateFromResource(string imageResourceName)
  {

  return CreateFromStream((MemoryStream)Assembly.GetCallingAssembly().GetManifestResourceStream(imageResourceName));
  }

不能强转,有间接的转换方法么?求大家指点

[解决办法]
不懂得

热点排行