|
it does exactly what i wrote before, it gets the amount of memory which is used by OS (in my case 3gb out of 4gb i have)
in other words it doesn't do requested job
|
|
|
|
|
I just checked the WMI approach you have, and it works fine for me returning about 3GB and 4GB for two different systems...
|
|
|
|
|
then why i get 2gb instead of 4 ?
another q, is how to get reference to LP_Win32.MEMORYSTATUS ?
Thanks
modified on Wednesday, November 17, 2010 4:44 AM
|
|
|
|
|
Because, as documented, Win32_ComputerSystem is unreliable. It depends on the machines BIOS to be accurate, which some are not.
Use Win32_PhysicalMemory instead. Add up the Capacity values for all of the PhysicalMemory objects returned and you'll get your total system RAM.
|
|
|
|
|
Dave Kreskowiak wrote: Use Win32_PhysicalMemory instead. Add up the Capacity values for all of the PhysicalMemory objects returned and you'll get your total system RAM.
Thanks, it worked, and I get all my 4gb
|
|
|
|
|
sorry. I copied the wrong prototype. Fixed now.
|
|
|
|
|
Hi,
I have one repeater and i am showing the data like this:
<asp:Repeater ID = "rptViewActiveCourses" runat="server" onitemdatabound="rptViewActiveCourses_ItemDataBound" >
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Name") %>
<%# DataBinder.Eval(Container.DataItem,"ID") %>
<%# DataBinder.Eval(Container.DataItem, "Year") %><br />
</ItemTemplate>
</asp:Repeater>
Now what i need is for every Name , if it starts with "s", I need to show small "right mark" on the side.
So How to loop the items already in the repeater ?
suchita
|
|
|
|
|
Hi suchita,
include some place holders into your item template (a label will do for a first test) and do the
population with data from within the rptViewActiveCourses_ItemDataBound method in the code behind
file. There you can check "Name" data item and do the logic to add a mark into one of the place-
holdes where appropriate.
Enough hints? You're welcome to come back for more
Cheers
Manfred
|
|
|
|
|
thanks. it worked.
suchita
|
|
|
|
|
|
Please post your questions to the correct forum; ASP.NET is more appropriate than C# in this instance.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
|
Repost.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
I am using sql2008 in my project.
In one of my tables one record in 1000 records can not be updated from sql2008 Editing enviroment (In MyTbl Edit Top 200 Row Window) and it makes error, but I can update that record from QueryAnalizer Window (With Sql Commands).
I have no problem with other records in this table.
Can anyone help me with this?
|
|
|
|
|
What error are you getting?
You might need to post some code here before anyone can help you.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
you are right but unfourtunately the computer that makes that error is not here now , So i will see the error message and ask it again to help
thanks my friend
|
|
|
|
|
Simple - what is implemented in the code is NOT the same as what you use in the window.
Common causes
- Assuming the data is the same rather than actually verifying it. If you didn't print it with deliminters then you assumed it.
- SQL syntax is slightly different.
|
|
|
|
|
i am trying to use PropertyInfo.GetValue() method to get the property value of some class..
its throuwing some target not found exception...
pls advise me the correct way..
|
|
|
|
|
inlight me!!
EASY COME EASY GO
|
|
|
|
|
arun_pk wrote: its throuwing some target not found exception..
Can you show the code where it is throwing that exception?
I are Troll
|
|
|
|
|
This exception can be thrown in two cases:
- The property is not static and you pass null to the target parameter.
- The property is not static but the object you pass as target does not match the target type.
As you say you want to "get the property value of some class" I guess your case is the first one. If a property is not static, you can get the property value of an instance of a class.
|
|
|
|
|
|
To better clarification you need to show code.
|
|
|
|
|
Some of[^] the errors that reflection can throw while using GetValue().
Its impossible for anyone to help you until you post some code here.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
I was doing assigng some wron object inside GetValue()
PropertyInfo.GetValue(classobj,null)
classobj should be the object of the class which we want to get property
thanks ...
|
|
|
|