.net

How to set attributes values using reflection

Hi, I have a class decorated with a attribute ...[DataEntity("MESSAGE_STAGING", EnableCaching = true, CacheTimeout = 43200)] for some requirement,I want to change this value "MESSAGE_STAGING" at run time to "Test_Message_Staging" . What is the best possible way to achieve this? Can i use reflection ,Or is there any other way to do th...

getting the current position from an XmlReader

Is there a way to get the current position in the stream of the node under examination by the XmlReader? I'd like to use the XmlReader to parse a document and save the position of certain elements so that I can seek to them later. Addendum: I'm getting Xaml generated by a WPF control. The Xaml should not change frequently. There are...

Does PHP have any extension/lib that allows you to use .NET (C#) resources (sources) in PHP code?

Does PHP have any extension/lib that allows you to use .NET (C#) resources (sources) in PHP code? ...

Is thare any way to translate .net C# into PHP and vice versa?

Is thare any way to translate .net C# into PHP and vice versa? ...

to run an exe file in the panel of c#.net application

thanks..im searching for the right answer but still not got it.. my question: i want to run an exe file on my winform .net application within the panel using c# code im able to run exe file on the button click with System.Diagnostics.ProcessStartInfo and Process p = Process.Start("notepad.exe"); but what is the code to run this notepa...

Programmatically fetch GPU utilization

Is there a standard way of getting the current load on the GPU? I'm looking for something similar to the Task Manager showing CPU%. Utilities such as GPU-Z show this value but I'm not sure how it gets this. I'm specifically interested in AMD graphics cards at the moment, any pointers would be helpful. If there's no clean API way of do...

Should I have methods which return lists of Disposable instances?

I have a class, instances of which need to be disposed. I also have several classes that produce these instances, either singly or lists of them. Should I return IList<MyClass> from my methods or should I create a class that is MyClassCollection which is also disposable and return this instead? EDIT: My main reason for asking is tha...

Creating anonymous class as custom key in dictionary.

While using dictionary, i always override GetHashCode and Equals ( or provide a custom comparer to the dictionary). What happens behind the covers when i create an anonymous class as key? Sample Code.... var groups=(from item in items group item by new { item.ClientId, item.CustodianId, item.CurrencyId } ...

visual c++ inner class as a property, possible ?

Hello, As a C++ programmer I've recently started to work with visual c++. I've get stuck with the properties. The idea is to create an inner class that would have 2 methods plus property like get/set functions. Does it even possible in visual C++ (i guess yes). The usage would be like this: Foo ^ foo = gcnew Foo(); int a; foo->Metho...

How do I find out what CLR i am using?

Is there something available that tells me what .NET version I am using and whether it is .NET 2.0 SP1? Thanks ...

How can i get Frame rate, Bitrate of any video file(wmv,mov,H.264,mp4)

i need to fetch the informations like frame per second, Bitrate for video file (wmv,mov,H.264,mp4) i m using IMediaDet for getting informations, it working fine for wmv, avi but not for mov and H264, and i am using ffddow codec for playing the mov and other file. Is there any other way to find these information using DirectShow or any o...

Free .net obfuscator?

I'm looking for a good .net obfuscator (for Visual Studio Express Edition) but it has to be free. Any recommendations? ...

How to serialize custom control property into form's resources?

Hi. I'm developing custom control for Compact framework. I want to add some design-time features for it. My control has byte[] property. This property stores data from file (about 20 KB). Visual studio designer produce for my control code like this: this.transparentPanel1.Image = new byte[] { ((byte)(137)), ((byte)(80)), ((b...

Create getter property with backing field using Mono.Cecil

I'm trying to inject getter property into already compiled assembly. Without backing field, it's reasonably easy: AssemblyDefinition targetasmdef = AssemblyFactory.GetAssembly(@"E:\tmp\sandbox\Cecil\ConsoleApplication1\library\bin\Debug\library.dll"); TypeReference returnTypeRef = targetasmdef.MainModule.Import(typeof(string)); MethodD...

How to find out which wcf services are hosted

How can I find out what wcf services are currently hosted, including information like the base address? (with C#) hosted on the local machine (with Visual Studio or IIS) ...

Should we build web services using WCF if we know our customers like BizTalk?

Background... We've built a web-based b2b system. We know that we'll need to exchange data with our customers' existing systems. Our plan is to create web services to allow two-way access to data. We'd like these web services to be consumable via REST and SOAP in a platform-agnostic manner. HOWEVER, we know that the types of companies th...

Shared files to bytes array

I use this function to convert file to bytes array: Public Function ConvertToBytes(ByVal path As String) As Byte() Dim _tempByte() As Byte = Nothing If String.IsNullOrEmpty(path) = True Then Throw New ArgumentNullException("File not exist", path ) Return Nothing End If Try ...

embedding thirdparty application in the panel of my own program using c#.net

can u give me the solution for embedding third party application in the panel of my own program in c#.net. i have the solution for embedding OS application in the panel but i want to call the third party in the panel of my .net program ...

Handling System.Web.HttpException

Any request to a non existent file or folder is throwing the following exception on my MVC project; System.Web.HttpException: The controller for path ... could not be found or it does not implement IController Important Edit: I would like to handle this case so that this exception does not go into my Elmah logs. Whatever I do inside ...

How to Catch Particular DB error in ASP.NET

In my SP (Sql Server 2005) I'm raising an error using Raiserror ('No Records Fetched' , 16 ,1) I want to catch this particular error in ASP.NET.. how do I do it ? ...