So, we're building a multi-tenant system to run as a service. We're starting from the ground up. We're following DDD; the domain has (at the moment) ~20 entities in it, and later there will be more. It is to be hosted by us, geographically redundant (n+1 of everything except SQL queries ;-) ), and of flexible design (well, that last ...
Is there any way to add a field to a class at runtime ( a field that didn't exist before ) ? Something like this snippet :
Myobject *ob; // create an object
ob->addField("newField",44); // we add the field to the class and we assign an initial value to it
printf("%d",ob->newField); // now we can access that field
I don't really care h...
Hi all,
I've just seen an article detailing the new C#4.0 'dynamic' feature previewed at the PDC 2008 and I wondered what people thought of it ? I'm wondering:
what are good examples of the benefit of such an addition to the language
possible disadvantages
performance implications
I guess people with experience of dynamic languages...
After reading many of the replies to this thread, I see that many of those who dislike it cite the potential for abuse of the new keyword. My question is, what sort of abuse? How could this be abused so badly as to make people vehemently dislike it? Is it just about purism? Or is there a real pitfall that I'm just not seeing?
...
I've been working on a SharePoint project and I have gone the route of loading User Controls through a custom web part.
I have several web controls where I need to dynamically generate hyperlinks (in a loop from a database) that will call certain functions of the User Control when clicked.
When I'm building my own ASP.NET sites, I just...
To implement "method-missing"-semantics and such in C# 4.0, you have to implement IDynamicObject:
public interface IDynamicObject
{
MetaObject GetMetaObject(Expression parameter);
}
As far as I can figure out IDynamicObject is actually part of the DLR, so it is not new. But I have not been able to find much documentation on it.
The...
So the next version of C# will support dynamic binding through the dynamic keyword.
Microsoft has especially talked about how this will make the syntax for COM interop nicer and it is of course necessary for interop with the dynamically typed .NET languages.
But what else do you think we will be able to do with this new feature?
...
We have set up a system where notifications get sent to a user with the following From address format: user-{0}@aol.com (replace {0} with an ID)
This way we can track what user we sent the message to originally. This format is not likely to change for various reasons. The issue we are running into is this: every email we send out wi...
Hi,
We need to generate LINQ queries which are 100% unknown during coding (design time). This is because the logic is available in our framework which is 100% separated from any data projects. For data we use LLBLGen generated data access code.
Normally by using invokes on the DLL, which we specify to the framework (not reference) we c...
In C++ I'd like to do something like:
int n = get_int_from_user();
char* matrix = new char[n][n];
matrix[0][0] = 'c';
//...
matrix[n][n] = 'a';
delete [][] matrix;
but of course this doesn't work. What is the best way to do something similar? I've seen some solutions to this but they seem pretty messy.
...
I'm listening to a talk about C#4's dynamic keyword and I'm wondering... Will this feature be orthogonal to other .NET features, for example will it support extension methods?
public static class StrExtension {
public static string twice(this string str) { return str + str; }
}
...
dynamic x = "Yo";
x.twice(); // will this work?
...
In C#4.0 we're going to get dynamic types, or objects whose "static type is dynamic", according to Anders. This will allow any method invocation resolution to happen at runtime rather than compile time. But will there be facility to bind the dynamic object to some sort of contract (and thereby also get full intellisense for it back), rat...
Hi,
I have a very simple question. I have 15 stored procedures that return data from a common table, then join that table with a specific table to retrieve inventory.
Ex.
Common: tblCommonSpecific: tblSpecific
Is there i was i can pass the name "tblSpecific" into a single stored procedure as a variable, like this:
SELECT ....
FROM ...
Hi friend,
I had read that SEO is applicable for static website, which holding the information in the initial page itself.. I want to know whether is it possible to achive the SEO for dynamically added informations..
I mean here i used ajax for loading information, in this situation how can achive SEO, is it possible.. please help me....
I'm binding a datatable to a gridview control, and when I format each column I need to format the data based on whether that column has a particular custom attribute. In this case, a column can represent:
a text box (in which case I just display the text from the textbox in the gridview),
a checkbox (in which case I display "Checked" ...
Hi All,
I'm setting up a User Control driven by a XML configuration. It is easier to explain by example. Take a look at the following configuration snippet:
<node>
<text lbl="Text:"/>
<checkbox lbl="Check me:" checked="true"/>
</node>
What I'm trying to achieve to translate that snippet into a single text box and a checkbox contr...
A "static" query is one that remains the same at all times. For example, the "Tags" button on Stackoverflow, or the "7 days" button on Digg. In short, they always map to a specific database query, so you can create them at design time.
But I am trying to figure out how to do "dynamic" queries where the user basically dictates how the d...
Hello,
In PHP, I can write:
$vname = 'phone';
$$vname = '555-1234';
print $phone;
... And the script will output "555-1234".
Is there any equivalent in Perl?
Edit: Thanks, CMS.
Is there any way to constrain $phone to the scope of the local block, as if I'd written "my $phone"? Using "my $$vname" gives me "Can't declare scalar dere...
I have a C# application where i want to implement a logic for a programm which will open the word document and go to a certain place in the page and create a Table and put values in that. Can any one tell me how to implement this. I am using Visual studio 2005
...
My question is similar to Engram's here, but my question goes a bit further. The way i intend it to work is I have a textbox asking how many entries a user is going to make. After they input the number, I need to create that many more textboxes to allow for entries (and then repeat the same process with those textboxes, but baby steps ...