|
@Richard: If you can't or don't want to answer my question, then it's easy - just don't.
I didn't ask you how to google, and if you read my question - I did NOT ask how it works or about simple examples, but about interesting solutions that somebody used about specific problem and has a valid reason to use dynamic.
|
|
|
|
|
I've used C# 4.0 for normal development since .NET 4.0 Beta 1 was released; and I haven't used dynamic a single time. I don't see any use for it except for talking to IronPython code.
There might some interesting other uses for dynamic in combination with custom IDynamicObject implementations; I would have to take a closer look at IDynamicObject.
In fact, the only C# 4.0 feature I use is covariance (and even that only for IEnumerable).
|
|
|
|
|
We have a couple of old COM components that are interacted with using late binding. We use configuration entries to determine which component to call because they have the same signatures, but they talk to different types of components, i.e. one communicates with certain hardware using TCP, while the other uses COM calls directly. The code that controls this is quite gnarly, and isn't fun to write because it requires lots of late binding work which is a complete PITA in .NET.
With dynamic, we can replace this code with a simple class that takes this pain away. So far, it's the only use I can find for using dynamic .
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hey guy,
When to use c# preset attributes in general, like
[MethodImpl(MethodImplOptions.Synchronized)] and is it possible to not use it at all??
Any help appreciated, thanks in advance.
|
|
|
|
|
Use them when you want to specify something that is specified by attributes, and don't use them when you are happy with the default value.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
could you give an example!!!!!
|
|
|
|
|
For your particular example, never use MethodImplOptions.Synchronized
It locks on the Type for static methods and this for instance methods - both bad practice.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Thanks for your nice reply, actually it benefits me a lot, but that's not what I need to know. What I was asking about was "When it become a necessity to use attributes in your code???"
Thanks a lot
|
|
|
|
|
Hi!
I have implimented Client Application Services in my Windows Application. I have a DAL and a Web Application as well. I am using ASP.NET Membership framework to enable my windows application to login a user against the same database that he uses to logon to the website.
The problem is that I can logon with a username and password on the website without any problem but when I try logging on to the windows app I cant authenticate.
I checked my connectionstring, membershipprovider, roleprovider etc but everything is fine. When I logon using my ID I can logon to both windows and web but when I create a new id using the ASP.NET Configuration tool I cannot logon to the windows app. I can logon to the website.
Any thoughts and/or ideas??
Illegal Operation
|
|
|
|
|
You told that your connectionstring,membershipprovider,roleprovider etc. are fine and when you are creating new account, it can't be authenticate..
This might because your new account is still deactivated..so checkout in your database, whether that user is active or not??
|
|
|
|
|
i want to join a tables multiple column with another tables single column, how can i do this. i am getting answer when i m doing it with single column to single column, can any body help me. Thanks in advance
|
|
|
|
|
Have you tried it? Are you getting any errors?
|
|
|
|
|
thank you for your response my problem is solved now
with the help of alias names
|
|
|
|
|
|
This is a SQL question and we have a SQL forum. If you bother to ask there, try to ask a question that actually explains what you want to do, what you've tried and where you are stuck.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
sorry for posting sql question here
thank you for ur response my problem solved now
with the help of alias names
|
|
|
|
|
Respected Sir's/Friends, i am building a project called a VideoBroadcaster, in this project i have to build a server and client. when the admin user will play a video file on the server same file should be played at the client machine.
Suggest me how to achieve this.
remoting? tcpchannel ? httpchannel or socket ? which one will be better.
we will need serialization?
Kindly help me thanks in advance
|
|
|
|
|
So, an admin starts a video on the server, it HAS to play on the server, and also be visible on the client ? They have to be in synch ? The admin can pause the video and it pauses on the client ? How much do you need them to play on the server, and how much control should the server have ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for reply
Admin will have the full control and in admin module we will have a video player type UI, in which he can play/pause/stop and that should be visible on the client machine
|
|
|
|
|
OK, well, that does make things more messy. If it's not a web based UI ( which I assume by what forum you're in ), then I'd imagine you'd send the videos down to the client, and you'd use a connection ( perhaps through WCF ? ), to send messages to all the clients telling them when to pause, when to play, and from time to time to tell them where the admin video is at so they stay in synch.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
It’s a scenario in which the instructor I will play a training tutorial on the system(server system) and the 25 students will be watching on their system(client), instructor can pause, play, stop.
I think I am not able to explain u properly sorry
its Windows base will be working on Lan
|
|
|
|
|
amaankhan wrote: It’s a scenario in which the instructor I will play a training tutorial on the system(server system) and the 25 students will be watching on their system(client), instructor can pause, play, stop.
OK, that's exactly what I thought.
amaankhan wrote: ts Windows base will be working on Lan
OK, well, being on a LAN probably makes it easier to establish TCP connections to pass data around. I still think you want to give everyone a program which can play the video, but that only plays/pauses/stops based on the messages coming from the instructor machine.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
yes, client will only have a option to close the file, that's it
So what should i use , Remoting with tcpchannel ?
and how to send the video file,and play it(serialization? )
|
|
|
|
|
I would think if you're just on a LAN, you would put the videos onto a shared location and transmit just that file location to the client. To be honest, the amount of network traffic will be so small, that I don't think it will matter what you use to communicate. Remoting will work just fine.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
thanks for the help.will be needing ur help in future in these prject. thanks
u means to say the file which is beeing played in the admin first should be stored on the shared folder, and from the client use this file from shared folder and play it ?
for these does we need serialization ?
can u suggest me any references or example for this.
thanks
|
|
|
|