首页 \ 问答 \ C#反射:获取类和基类的所有成员的信息(C# Reflection: Get info for all members of class and base classes)

C#反射:获取类和基类的所有成员的信息(C# Reflection: Get info for all members of class and base classes)

当我运行以下代码时,它只返回一个MethodInfo / FieldInfo / FieldInfo 它直接属于我正在搜索信息对象的Type 。如何查找信息对象,而不管它是否存在于基类中并且可以是私有的?

obj.GetType().GetMethod(methodName, bindingFlags);

When I run the following code, it only returns a MethodInfo/FieldInfo/etc. that belongs directly to the Type that I'm searching for the info object in. How do I find the info object regardless of the fact that it resides in a base class and could be private?

obj.GetType().GetMethod(methodName, bindingFlags);

原文:https://stackoverflow.com/questions/15711500
更新时间:2023-12-16 11:12

最满意答案

APK限制已从50MB增加到4GB(请参阅http://androidcommunity.com/android-market-upgrading-app-size-limit-to-4gb-20110511/ ),因此可以假设应用程序可以存储到4GB。

也就是说,您应该将任何大型文件存储在SD卡(或类似的)上,而不是占用应用程序空间(某些手机这是共享空间,例如Galaxy Nexus。)这样做不会有任何限制,除非据我所知,SD卡上的可用空间。


The APK limit has been increased from 50MB to 4GB (see http://androidcommunity.com/android-market-upgrading-app-size-limit-to-4gb-20110511/ ), so one would presume that an app could store up to 4GB.

That said, you should be storing any large files on SD card (or similar) instead of taking up the app space (some phones this is shared space, such as the Galaxy Nexus.) Doing it that way won't have any limits except the space available on the SD card from my understanding.

相关问答

更多
  • 对于固定长度类型(如int NULL ,它始终使用类型的长度(即int的4个字节,无论它是设置为NULL还是NOT NULL)。 对于可变长度类型,在可变长度列偏移列表中存储NULL + 2个字节需要0个字节。 这用于记录每个变量长度值实际存储在页面行中的位置。 此外,NULL或NOT NULL标志为每列使用1位。 具有12列的表将使用12/8字节(= 2字节NULL位图)。 此链接将为您提供有关该主题的更多信息 一旦知道NULL的百分比,就可以查看此链接以获得潜在增益的估计值。 稀疏在空值上节省空间,但是 ...
  • 好问题。 简而言之,没有简单的方法可以做到这一点(即使对我们来说也是如此!)因为这实际上要求我们对一整套文件进行递归并将它们全部加起来。 这是一个非常大的mapreduce,每次上传文件时运行效率都不高。 但是,我们会在metadata.size属性中返回单个文件的大小,因此您可以在服务器上执行自己的list调用(查看gcloud` ),它将为您提供文件和“文件夹”列表。 获取文件的大小并将其添加,然后递归并对所有子文件夹执行相同操作。 总结一下,并将它们写成Firebase实时数据库,您可以轻松地从客户端 ...
  • 这是一个非常简单的解决方案,适用于我的三星Galaxy S II和注1 ; 我不知道其他型号: 打开手机应用程序并切换到键盘。 拨*#9900# 在出现的屏幕上,单击标有“删除dumpstate / logcat”的按钮。 我以这种方式恢复了大约一GB的系统空间。 Here's a very simple solution that works on my Samsung Galaxy S II and Note 1; I have no idea about other models: Open the ...
  • IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication(); long usedBytes = isf.Quota - isf.AvailableFreeSpace; 这里的文档: http : //msdn.microsoft.com/en-us/library/system.io.isolatedstorage.isolatedstoragefile(v = VS.96).aspx IsolatedStorage ...
  • 根据谷歌的一些相关的示例代码,你可以采取这样的路线: IntentFilter lowstorageFilter = new IntentFilter(Intent.ACTION_DEVICE_STORAGE_LOW); boolean hasLowStorage = registerReceiver(null, lowstorageFilter) != null; 换句话说,有一个DeviceStorageMonitorService服务在OS级别运行,并检测到低存储情况。 从那里,它发送一个粘性的广播 ...
  • 不,没有存储空间的系统通知。 No, there are no system notifications for storage space.
  • 您的保存方法将失败并抛出一个NSFileWriteOutOfSpaceError 。 如果你处理大量的磁盘空间, 这可能对你有用 。 编辑: 在剩下的空间中,您可以使用以下代码: NSDictionary *fsAttr = [ [NSFileManager defaultManager] fileSystemAttributesAtPath:NSTemporaryDirectory()]; NSNumber *totalFreeSize = [fsAttr objectForKey:NSFileSyst ...
  • 好的..我清除了我的App数据,然后通过手机上的File Commander App复制更多文件,设法填补了最后99mb的空间。 然后我打开了我的Ionic App并登录(下载了大约1.5mb的App数据),App似乎工作正常(因为当时所有内容都存储在RAM中)。 一旦应用程序关闭并重新打开它,所有存储的数据都消失了(因为没有空间将其从RAM中移动到我猜中) 最终结果:应用程序在RAM中工作正常,但如果localStorage中没有空格,它将不会出错或告诉您它不起作用,它将不会保存数据。 注意:我没有在应用 ...
  • 您无法停止下载,但可以在使用deleteLocalStorage关键字关闭应用时自动删除,请查看以下有关localStorage的链接https://cordova.apache.org/docs/en/2.7.0/cordova/storage/localstorage/localstorage。 HTML You cant stop from downloading but you can delete automatically when app is closed with deleteLocalS ...
  • APK限制已从50MB增加到4GB(请参阅http://androidcommunity.com/android-market-upgrading-app-size-limit-to-4gb-20110511/ ),因此可以假设应用程序可以存储到4GB。 也就是说,您应该将任何大型文件存储在SD卡(或类似的)上,而不是占用应用程序空间(某些手机这是共享空间,例如Galaxy Nexus。)这样做不会有任何限制,除非据我所知,SD卡上的可用空间。 The APK limit has been increase ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。