.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
ASPEvil
Ashutosh Jha
Jean Paul
satyapriyanayak
SP
Post New Web Links

What is the difference between "dynamic" and "object" keywords?

Posted By: Amit Mehra     Posted Date: February 01, 2010    Points: 2   Category :.NET Framework
 
Let's take a quick look at the object keyword first. I'm not going to talk a lot about it because it's been around since C# 1.0. This keyword is nothing more than a shortcut for System.Object, which is the root type in the C# class hierarchy. (However, as Eric Lippert pointed out in his blog post, not everything in C# derives from object.) This is a powerful mechanism, since you can assign almost any value to instances of this type.


View Complete Post


More Related Resource Links

Dynamic Object and Databinder

  
aHello,im trying to use dynamic object in a databinding tag , it gives me error that the property does not exists even though i can see all the properties there in the vs debug modehere is what im trying to do:C#:my method signature:public static dynamic MyMethod()ASPX:in control itemtemplate:<%# MyMethod().SomeProperty %>if also trite the other way:C#:public static object MyMethod()ASPX:<%# ((dymanic)MyMethod() ).SomeProperty%>But i dont know why it cant resolve the properties , even though i can see them when the databinder control throws an exception(its working fine outside the databinder tag (ie normal aspx tags <% %>)

What's the difference between a dynamic data project and adding a gridview to a "normal" project?

  
Hi,I'm having difficulty understanding what dynamic data actually is.There is an option to specifically create a dynamic data project, but I don't understand the difference between this, and just adding some kind of data control, like a gridview or detailsview for example.If someone can help me understand this better I'd really appreciate it.

What is the difference between "create set" and "create dynamic set"?

  

What is the difference between  "create set" and "create dynamic set"?

we have a complete cube ready for production that was tested and working without any issues in non-r2. we found that some "create set" assignments don't work in R2. But when changed to from  "create set" to "create dynamic set"? they are working, However, not sure how it will impact other areas of the cube.


WPF Dynamic menu associated with the object?

  

Hi everyone. I'd like to be able to create dynamic menus associated with certain object. Let’s say, I will have 3 listview container with one style where I also have a Menu. I need to generate different menu items from collection of the RoutetUICommands in relation on each listview. I was trying to solve this puzzle but took me a while and still have trouble making it work. Any ideas are highly appreciated. Thank you!

XAML:

<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:Microsoft_Windows_Themes=

difference between object declare instantiation and initialization

  

Hi All,

             I am confused over these three terms,i know what is object declaration and initialization but confused over ojbect instantiation ,i am giving a example below what i understood :


Class ABC

{


|


Public static Void main()

{

ABC a   // Object declaration

 a = new ABC();   //Object initialization


//Then when and how instantiation comes into picture


}


Please provide any expale or informative links(if possible) while replying.

Thanks,

Ankur


Dynamic controls added at runtime, threading, The calling thread cannot access this object because a

  

Hi,

 

My problem is on load I initialise a new thread. This thread create a new control then tries to add the control to a stackapnel and the error I receive is -

The calling thread cannot access this object because a different thread owns it.

Heres is my code e-

Thread

 

 

t = new

Using DataContractJsonSerializer on dynamic JSON object

  

I'm using the DataContractJsonSerializer and the DataContract and DataMember class atrributes to serialize some JSON sent to me from a 3rd party javascript component. All is working well except the component sends some dynamic data.

 

ex. { "objects": [{"object1": "value"}, {"SomeOtherObject": "anotherValue"}] ... }

 

What are my options for serializing this if the "object1", "SomeOtherObject" are all dynamic and I can add them into the class that I serialize to. Is it possible to get the JSON Serializer to convert this to a Dictionary<string, string>??

 

Also I'm using C# 3.0 so dynamics is out.



UnCommon C# keywords - A Look

  
This is really a weird topic to start with. But still I would like to give you an insight on some of the uncommon things that you may not have noticed while doing programming. I have framed them in 2 sections.

1st one for Undocumented Keywords, which you will not find anywhere, not even in MSDN Documentation, which are not listed to intellesense menu in visual studio.
2nd one for Documented Keywords which are uncommon or just being introduced to C#. Documented keywords which are uncommon can be found over MSDN.

Thinking about new C# method prototypes: object as dictionary

  
I recently had to write a small Flickr API. I know many .Net API for Flickr already exist but I needed one for a Silverlight application. Whatever, it's only about building some querystrings so I did it by myself. It's been an opportunity to think again about a classical question: how to pass parameters to a method ?

Imagine you have a generic method to call some Flickr functions.

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

  
In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Dynamic Data Templates in GridView ASP.NET 3.5

  
At a high level, Dynamic Data Templates can be seen as a system to very quickly build up a User Interface linked with the relevant data model, immediately enabling you to perform CRUD operations (Create, Read, Update, Delete) on the database using the specified data source. They provide a powerful method for building up these kinds of applications, and I'm going to focus on an overview of what Dynamic Data Templates actually are, and a few ways of customizing them to suit industry needs.

C# Object Oriented Programming

  
So far in C# Essentials we have looked at the basics of programming in C# such as variable types and flow control. Although it would be possible to write a functional program using these techniques, there is much more to becoming a proficient C# programmer. C# is, above all, an object oriented programming language and as such any C# programmer will be expected to create object-oriented applications using this language.

Object Oriented Programming

  
Four core concept of OOP Object Oriented Programming. 1.Inheritance, 2.Polymorphism, 3.Abstraction and 4.Encapsulation

Object-Oriented Programming Concepts

  
This is the first in a series of articles describing the use of object-oriented programming techniques as implemented by the C# programming language. This series follows the C# Fundamentals tutorial that beginners are advised to read first.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend