Click here to Skip to main content
15,905,233 members
Everything / DynamicMethod

DynamicMethod

DynamicMethod

Great Reads

by kr.is
How to create a simple validation attribute using C#
by Prabu ram
A complete automatic generation of menu in ASP.NET MVC using attributes applied on controllers.
by mbarbac
Implementing the Repository and Unit of Work Patterns dynamically using Kerosene ORM

Latest Articles

by kr.is
How to create a simple validation attribute using C#
by Prabu ram
A complete automatic generation of menu in ASP.NET MVC using attributes applied on controllers.
by mbarbac
Implementing the Repository and Unit of Work Patterns dynamically using Kerosene ORM

All Articles

Sort by Score

DynamicMethod 

21 Jan 2020 by kr.is
How to create a simple validation attribute using C#
16 Nov 2012 by Sergey Alexandrovich Kryukov
Hard to say exactly why the timing results are as you observe them, but I can see one problem: you time the calls of the method incorrectly, because you don't take into account the time taken by JIT. Again, both methods are eventually JIT-interpreted, so it's pretty hard to explain why the...
17 Nov 2012 by Alan N
I modified your code slightly so that it could be compiled using all .NET versions.With .NET2 and 3.5 there was no difference in execution time between the standard and dynamic methods, both taking about 1400 - 1500ms in release mode.However .NET 4 (v4.0.30319) was a different story...
17 Feb 2023 by OriginalGriff
You allocate a block of memory (20 chars worth) and tell the system that that is a set of pointers to chars - because Str is a pointer to a pointer to a char. Which is effectively a pointer to a string. Think of Str as a array of pointers to...
9 Sep 2013 by Prasad_Kulkarni
Check out:Dynamically created hyperlinks to call a c# function[^]
10 Sep 2013 by TheUltimateDebugger
c-sharp-html-hyperlink-call-a-method[^]
9 Sep 2014 by Vincent Beek
Open the circularGaugeDemoWPF project in the customcontrol that you downloaded from this site.Remove the 4 controls from the Window1.XAML. Remove the code from the window1_loaded event in codebehind. Add using CircularGauge;Add to constructor: CircularGaugeControl cg =...
28 Dec 2014 by ridoy
I think you need something like this:imageview drawable id in android[^]
24 Jul 2015 by OriginalGriff
I'm going to be brutal here, but hopefully not upset you too much. Then I'll try to explain some of what you should have done! :laugh:That's really bad. It misses the point of object orientation completely, and not only breaks every rule, it also shows that you don't understand what an...
7 Mar 2013 by Nishant Patriker
Hi, I am working on a complex function of multiple groupby using LINQ dynamically.i have a query like :var groupByData = dataCollection.AsQueryable().GroupBy(strGroupby.ToString(),"it").select(strdata.ToString());i want to access data through the collection that i have as...
10 Mar 2013 by Andreas Gieriet
You seem to not understand delegates and lambda expressions.A Linq expression based on the Enumerable extension methods as GroupBy etc. take delegates, usually in the form of lambda expressions.E.g. the function Select is defined as described in Enumerable.Select(...)[^]. It takes a...
9 Sep 2013 by sazzad37
I have a dynamic Hyperlink like that HyperLink[] lblQuestionNum = new HyperLink[100]; for (int i = 0; i
10 Sep 2013 by Rakesh Meel
visit here..http://stackoverflow.com/questions/6483953/connect-hyperlinkfield-click-to-server-side-method-c[^]
4 Jul 2014 by karttick
I m trying to generate updatepanel dynamically on user controll so that i can use that user control on other pages. But the update panel is not working properly on user control. I searched on google but didnt get any desired output. My Script manager is on Master Page.Exception is :1. The...
7 Jul 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
Here we answer specific questions which members face during programming. We can't work on the whole source code. You need to do that yourself.If you face any difficulty while coding, feel free to come back here and ask another question with specific issue describing the scenario....
8 Jul 2014 by rahulDer
I m having a gridview with simple student information.This gridview having a column of link button which generates Grid_rowcommand method().But when I click on that link button, i need to have a row right under the selected row only with Textbox in which i can write some text and can send...
10 Sep 2014 by Kinna-10626331
I am new in WPF and C# and I am adding controls in a WPF app dynamically.I tested my code with a windows slider first and it works but When I try to add a custom control didn't works. I am using the Agauge Circular gauge custom control for Silverlight 3 and WPF[^]I used this control in...
15 Sep 2014 by Kinna-10626331
I would like to add the number of columns and rows through binding . I have been looking for it but I only find how to bind the content or how to do this task programatically in the code behind.I want to do it in the ColumnsDefinitions and RowDefinitions but I am starting to think that there...
16 Oct 2014 by rahulDer
I am having a button which generates 3 controls on click.the controls are Textbox,Dropdownlist and a FileUpload control.WHen i click Add button first time it works fine for me but when I filled all the three controls and click on Add button, it generates postback and i loos my filled data in...
18 Oct 2014 by amit29391
add a flag when your controls are generated and check it on loadeg:-bool flag=false;//add before page load even i,e at global level of your pageprotected void btnAddmoreDocs_Click(object sender, EventArgs e) { if(flag=false) { AddUserControl();...
28 Dec 2014 by User1454
// Create ImageView Dynamically int img1_id,img2_id; ImageView img_view = new ImageView(this); img_view.setBackgroundResource(R.drawable.bulb); img_view.setId(j); ll.addView(img_view); img_view.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v)...
8 Feb 2015 by Parth Akbari
if (this_call!=null && has_value(this_call.data().process_step))$container.find('.col1:[key="'+this_call.data().process_step+'"]').click();else{$container.find('.col1:[key]:first').click();//Error}i got error "Syntax error,unrecognized expression" on below...
13 Apr 2015 by snamyna
Hye all.How to retrieve dynamically-created-textbox text inside dynamic template field of a gridview? Here's my code.------------------------------------HTML ------------------------------ No of Rows: ...
14 Apr 2015 by snamyna
I have solved this by using Request.Form(key) in PreInit function.Protected Sub Page_PreInit(sender As Object, e As EventArgs) Handles Me.PreInit Dim keys As List(Of String) = Request.Form.AllKeys.Where(Function(key) key.Contains("txtName")).ToList() Dim i As Integer =...
26 Jul 2015 by markelis
I have created a class Player and I want to use a method that creates a list of Players. I wrote some code but something is wrong and i don't know what. The only record if the list that I am able to print out at the Console is the last one. What am I doing wrong?Below is the code that i...
19 Jan 2016 by Member 10774223
Hi all,In our current system (using Visual FoxPro), we populate Menu of the system dynamically by retrieving source data from database.We will stored the Menu Name, Code, sorting order, hierarchy or whatsoever in a table in SQL server database, retrieve them during system initialisation...
21 Jan 2016 by najmbe
I would create an interface with all the options I have in the db , and assign it during runtime based on chosen command.
24 Aug 2016 by Dev O'Connor
Hi,i am not sure if this is at all possible, and i have tried myself but cannot seem to get anywhere with it:i have several sub classes that perform a bunch of sql statements and hold values in sub classes, one downside to this is that i have to have to setup properties under each class...
29 Aug 2016 by MYQueries1
After I deserialize i am unable to retrieve the value of x.args, getting exception as: Object of type 'System.Dynamic.ExpandoObject' cannot be converted to type 'DynaProxy.EventService.Args.BaseEventArgsWhat I have tried:dynamic obj = new ExpandoObject();obj.Name = "T"; obj.args = new...
11 Dec 2016 by Jochen Arndt
You have an out of bound array access at b[i]. The array has a size of 9 items (max. allowed index is 8) but you are accessing index 9 within your loop (last i is n+1 = 9).I don't know the cutting rod algorithm. But you might have to either change the b array or use b[i-1].
24 Mar 2017 by Member 12995602
I have a sports team wordpress site with a series of mysql tables that i presently update manually.Would like to know what plugin or other option would be the best to allow clients/users to login and update tables on a weekly basis.I have a very low budget and cannot afford to spend a lot of...
25 Jan 2018 by Member 13644023
The above example is taken from book Algorithms Design and Applications by Michael T. GoodRich (page number 336 to 338 in text book and in pdf it's from 354 to 356, section 12.4.2) link to the pdf So my question is that where I've gone wrong in calculating the probability for team A to be...
23 Jul 2018 by OriginalGriff
So, you've posted this on stack exchange: programming practices - Solving Safe Breaking - Software Engineering Stack Exchange[^] And stack overflow: python - Solving Safe Breaking - Stack Overflow[^] And how because they won't do your homework you bring it here. Guess what? We don't do your...
23 Jul 2018 by Patrice T
Quote: 0 down vote LOL Quote: This question was recently ask in a contest which is now over These contest are especially designed to challenge your skills, so you got the answer: You are unable to solve it. Quote: I tried to solve it by brute force but it give TLE brute force is never the...
27 Nov 2020 by Member 14969271
Hi, all. I am a new VB.NET beginner. I am facing an issue on how to pass the dynamic parameter value from SQL query, that will be entered by the user into the textbox, to the SQL command to search on the parameter value on the datagridview...
21 Aug 2021 by Absy 2021
Hi, the question is the same as the Climbing stairs problem in leetcodeLoading...[^] My code for the base case works fine but I keep getting KeyError Traceback (most recent call last)...
21 Aug 2021 by OriginalGriff
If you get an error message you don't understand, google it. A very quick google for "Keyerror" would have got you here: KeyError - Python Wiki[^] Which explains what causes the problem. Now all you need to do is work out why - and since that...
26 Aug 2021 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
26 Aug 2021 by Patrice T
Quote: Help on solving problem This problem comes from a challenge site. Those problems are known to be tough, and especially for the clever solution. So, your answer is that you failed. Usually, just giving you the clever solution will not help...
11 Sep 2022 by Everything Select
PLEASE HELP!!! This code is supposed to run like the basic snake game (except that I haven't coded the game-over conditions yet). But what is happening is that the body length doesn't increase more than 1 (i.e., the 1st time the snake eats food,...
11 Sep 2022 by Rick York
In my cursory look at your code, I see a few issues. The first is the use of so many global variables. I understand they are needed on occasion but at the least, given them descriptive names that are longer than two letters. When I use a...
20 Feb 2023 by Addy__0
#include #include #include int main() { char **Str; Str= (char**)calloc(20,sizeof(char)); Str[0]= (char*) calloc(10, sizeof(char)); Str[0]= "Hello, world"; printf("%s", *(Str+0)); } What I have...
20 Feb 2023 by Fred van Lieshout
Just keep in mind that everything takes up memory, including pointers. It can be handy to let a pointer (to a pointer) point to something else. Also, the line where memory is allocated to store the actual string, is not needed. Str[0]= (char*)...
15 Oct 2016 by Prabu ram
A complete automatic generation of menu in ASP.NET MVC using attributes applied on controllers.
11 Mar 2014 by mbarbac
Implementing the Repository and Unit of Work Patterns dynamically using Kerosene ORM
16 Nov 2012 by Pascal Ganaye
I wrote a simple object copier that copies public properties.I can't figure out why the Dynamic method is a lot slower than the c# version.DurationsC# method : 4,963 ms Dynamic method : 19,924 msFull (console program) code:using System;using...
10 Feb 2016 by BillWoodruff
If you have this:using System;namespace YourNameSpace{ public abstract class PersonBase { public PersonBase(Guid id) { Id = id; } // hide from exposure outside 'ctor or 'ResetID method internal Guid Id { private set;...
9 Feb 2016 by Oguz Türkan
HiI try to create dynamic method aspublic void SetId(Guid id){ Id = id;}I try but Id is private set var DynamicMethod = new DynamicMethod("Division", typeof(void), new Type[] { typeof(Guid) }, entityType.Module); var il =...
24 Aug 2016 by InbarBarkai
Since you're using generic dictionary the child class should be generic.Try this:/// /// Holds the properties values for the array record/// public class ChildClass{ private Dictionary objDict; public ChildClass() { ...
9 Feb 2016 by Oguz Türkan
Thanks for replay. Sample code is below public abstract class Base { public readonly Id; } public class Person : Base { } I create Person Instance like Activator.CreateInstance()i want to set Id. Any suggestion ?thanks
11 Dec 2016 by Member 12378355we
#include using namespace std;int main(){ int n; n=8; int dp[n+2][n+2]; for(int i=0;i
23 Jul 2018 by Aman Rawat
0 down vote favorite This question was recently ask in a contest which is now over, but they don't share the editorials with us and this question is stuck in my mind and i am not able to get the answer in optimal way, anybody please explain the proper approach for this is very helpful-:(And if...