|
Hey all I have dynamic method that get a type passed in. how do I use that param to box the object. So...
<br />
DynamicMethod dynamnicGet = new DynamicMethod("DynamicGet", typeof(object), new Type[] { typeof(object), typeof(Type) }, typeof(object));<br />
ILGenerator il = dynamnicGet.GetILGenerator();<br />
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Callvirt, methodInfo);
il.Emit(OpCodes.Ldarg_1);
il.Emit(OpCodes.Ret);
Hope that makes sense. Any ideas anyone?
Thanks,
Luke
|
|
|
|
|
How to create a PivotTable in C#.
Thanks in advance
It seem to be a solution or an answer.
|
|
|
|
|
What's a PivotTable?
As it turns out, just a couple weeks ago I found I had the need to take a DataTable and pivot it, so I wrote a method to do it.
The shortcoming (and probably why it's not built-in) is that unless all the original columns hold the same datatype, you have to make the resultant columns hold object (or determine some other common ancestor).
At the time I was thinking of writing an article about it, maybe I should.
|
|
|
|
|
You posted this question earlier in the day under another thread. Don't you think that you should wait a bit before posting this question again?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
This is a simple problem that I cannot believe that I can't solve!!
I have a C# ASP.NET site.... Easy! In my HTML/ASP I have a datagrid declared and one of the columns in my datagrid pulls dates from the database (through a data set) and displays them on the page. My dates come up looking like this:
21/02/2006 12:00:00 AM
I want them to look like this:
21/02/06
I've tried to do this to the header DataFormatString="{0:dd/MM/yy}" but that doesn't work!
Any suggestions to this problem would be awesomely appreciated!!
Cheers everyone,
Michael!!
|
|
|
|
|
Why can't you query that format from the database itself?
set dateformat 'dmy'
select convert( varchar,cast(floor(cast(cast(dateColumn as datetime)as float)) as datetime),103) "Date"
Hope that helps you.
Regards,
Arun Kumar.A
|
|
|
|
|
Cheers for that.... that did the job!! Thanks so much for you help Arun
|
|
|
|
|
If someone answered your question, you should vote for that for two main reasons:
1. To help others to recognize the right answer post that worked well
2. To help the one who helped you on his way up to be an MVP here, which's the only way to say thank you here in cp;)
Please do vote.
Cheers.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Please use yyyy-MM-dd, or it possible to allow the user's browser/OS to determine which format the user wants?
|
|
|
|
|
Well said. I can't believe the pompousness and insensitivity of the jerks who display dates as MM/dd/yyyy. I find it incredibly irritating and threw out Sunbird because of that. Too bad I can't throw out the corporate apps.
Cheers,
Vıkram.
Déjà moo - The feeling that you've seen this bull before.
Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
|
I have a user control and I don't want some properties automatically generate value by the designer.
I search MSDN and just see that I can use DesignOnlyAttribute class but it is not suitable for my situation.
How could I do that?
Thank for your help.
|
|
|
|
|
Hello,
I think the "DefaultValue" Attribute is what you are looking for.
If it's equal to the designtime setting, it will not generate code for this property.
Be aware that the property has to be initialized correct.
Hope it helps!
All the best,
Martin
|
|
|
|
|
I’m using a Visio drawing control in C# application.
I wanted to know, how to select a particular Visio shape form the drawing.
Thanks in advance …
Asit.
Asit
-- modified at 2:17 Thursday 10th May, 2007:
|
|
|
|
|
hi,
am currently working on a purchasing system project...using c# and MySql.can somebody send me an article about this project...
thank you guys, hoping for your reply...
regards
jing
|
|
|
|
|
balanjingot wrote: can somebody send me an article about this project
Your joking, right? If you have no idea how a purchasing system works, you have to get with the customer and find out, and very specifically. Your code is going to model the process of purchasing. Without knowing how one works, you're pretty much not going to be able to do this project at all.
|
|
|
|
|
Wow....
I'd guess this was homework, not a paid assignment. Who would trust someone to write their financial system, and not take the time to explain how it should work ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The really scary part is he said he was already working on it. I guess he didn't get very far...
|
|
|
|
|
balanjingot wrote: can somebody send me an article about this project...
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
I think u r making a project which is client specific not a generic software that everyone can use.. so it's better for u to arrange some meetings with your client and get a better understanding how the perform their tasks...
and then according to your understandings and with the acceptance of your client u can make your software using RAD process
hope i clear my point of view to u.
|
|
|
|
|
hi,
thanks, i accept all your comments and reactions positively...
actually, i have been working on it, you're right am working on a specific client.
what i mean on the article that am asking for are example codes, screenshots just for supplementary purposes...
ok?
regards
jing
|
|
|
|
|
Have a look at open source CRM projects at SourceForge .NET
|
|
|
|
|
thanks buddy...
regards
jing
|
|
|
|
|
I am getting an error at run time on this line of code
newDayIndex.InnerXml = index.ToString();
here is how i'm doing all the xml code
XmlTextReader reader = new XmlTextReader(C_strFileName);
XmlDocument doc = new XmlDocument();
doc.Load(reader);
reader.Close();
XmlNode oldIndex;
XmlElement root = doc.DocumentElement;
oldIndex = root.SelectSingleNode("/config/Days_Index");
XmlElement newDayIndex = doc.CreateElement("Days_Index");
newDayIndex.InnerXml = index.ToString();
root.ReplaceChild(newDayIndex, oldIndex);
doc.Save(C_strFileName);
|
|
|
|
|
What error are you getting and what line causes it?
Side note: try doc.Load(C_strFileName);
|
|
|
|