.net

Calling Oracle stored procedure from C#.net?

I just started reading about stored procedures. Can anyone please help me call a stored procedure in oracle from C# Thanks in advance ...

How to create a Dependency property on an existing control?

I have been reading on Dependency properties for a few days and understand how they retrieve the value rather than to set/get them as in CLR properties. Feel free to correct me if I am wrong. From my understanding all WPF controls like a TextBlock, Button etc that derive from DependencyObject would also contain dependency properties to ...

Textblock style toggle!

Hello... I have a style which underlines the textblock when it is mouseovered... How ever i need when it is clicked to change its font weight to bold(selected).. any idea? ...

role based access to methods

I'm implementing system which uses role based access to different methods in classes. For example to perform any action I need to check whether user which uses it can do it. I can write in each method: if(User.IsInRole ...) { } else { return ... throw ... whatever } I was thinking about automating this process for example by adding a...

How to add Array as a property in ADO .NET Entity Framework

Hi, I am using Custom data service provider for an application. I need to add following class as entity public class PhysicalAddress { public PhysicalAddress(); public string City { get; set; } public string Country { get; set; } public string CountryCode { get; set; } } class Parent { public PhysicalAddress[] Address { ge...

Content blured in Silverlight4 after making a rotation and a scale

Hy, I am making a rotation of 180 degree and after that a scale of -1 on X axis. This is applied to the main grid of the user control. In this grid i have a button and a stack panel with textBox. The problem is that after the animation is done the button and the textBox become blurred. If someone can help, i wait an answer. Thanks. ...

determine which IP addressed has been used to open a url in c#

Say, I have 2 or more active network cards on my machine. i am using a c# application from which i am calling an asynchronous service. i want to be able to determine which ipaddress have i used when calling this service. for example, my two active ip's are 192.168.10.5 and 192.168.5.7 and the service ipaddress is 192.168.7.12. ...

Should I reuse a FileStream/BinaryWriter object?

Update: After looking in the event log at around the time this occurred, I get the message: "The server was unable to allocate from the system nonpaged pool because the pool was empty." repeated continually throughout the log, until it was rebooted. I am writing a class that writes debugging information to a file, up until now the class...

Why would ppl want to use Invoke() (not BeginInvoke())?

I was told that Invoke() is similar to normal method calling... so why would ppl choose to use Invoke and not normal method calling? I tried to search online regarding the issue, what i get is the advantages of using BeginInvoke(), but what are the advantages of using Invoke()? Thanks ...

Fetch n bind data from StoredProcedure with Join, LINQ then Split. using IMultipleResults,Linq2SQL

Hi Everybody I Have one application in it i am using stored procedure and LINQ my procedure is like myProc select col1, Col2, Col3 from Tab1 inner join Tab2 on col1=ColA join tab3 on Col1=ColD Select cola, Colb, Colc from Taba inner join Tabb on cola=ColX join tabc on Cola=ColY Select colP, ColQ, ColR from TabP inner join TabQ on...

WPF/XAML animation using own event

Hi all, I've used WPF for quite some time now, but I've never looked serious into animation. I'm trying to achieve the following, but until now, not successful. I have a class called "Property". This class has the ability to fire an event: public class Property { // ... public event System.Windows.RoutedEventHandler Attract; ...

Compatibility settings

Hi there, I'm working on a troubleshooting program, which will help users to fix certain errors caused by.. all sorts of things. Anyway, one of the features I want it to have, is change a program's compatibility mode to windows XP mode without Visual Theme's. But I couldn't find anything. So I'm just wondering if this is possible? Th...

Get Start with BouncyCastle crypto dll c#

I'm starter with cryptography I woul like to use BouncyCastle .dll for c# but I cannot found documentation and examples. In particulary I need to use to sign files with pkcs#7 (.p7m results) and add to them RFC 3161–compliant, time stamps from trusted server (.m7m results). somebody can suggest where I can found examples and documenta...

Problem with custom type converter in VSX package

Hello. I have the following question. I have MSVS solution with three projects in it. first project is VSX project witch shows form with property grid in it. second is typical C# library project with custom type converter class BooleanYesNoConverter inherited from BooleanConverter. This converter is used to show Yes/No in property grid...

Can I change source code from .NET Framework Library's class?

I got System.Collections.Generic.List<T> source code from mscorlib.dll using .NET reflector. I implemented INotifyCollectionChanged and INotifyPropertyChanged interfaces, renamed the class and builded it. Did I violate copyright? I not using MS source code release with Microsoft Reference License (MS-RL). What about the code deassembl...

How to forbid backspace key in WPF

Hi all How can I forbid the Backspace-Key as easy as possible in a WPF-Application? The KeyDown-Event don't catch at the DEL and the Backspace-Key. Thank you! ...

Open source code coverage tool for both managed and unmanaged code?

Hi, I need to generate code coverage metrics for a suite of nunit tests. The tests call functions in a managed dll which in turn uses PInvoke to call unmanaged dlls. I understand that VSTS can be used to generate code coverage metrics in this scenario for both managed and unmanaged code, apart from that are there any open source tools t...

NHIbernate affecting non-nhibernate queries?

I have got an odd problem with NHIbernate, and seeing as this is my first NHIbernate project I thought I'd ask the good people of StackOverflow.com. I'm following the 'Open session in view' pattern in ASP.Net, which opens a hibernate transaction on each request and commits it at the end of the request. This works fine normally, howeve...

Count Code Lines Number in Visual Studio

One team will analyze our .NET project(solution) code, so, before, they asked about how many lines of code contains our project. Is there some statistical data, some code metrics in VS 2010? ...

Distinct on a specific field

I have a class structure: class MyEx{ public int Prop1; public int Prop2; public int Prop3 } Prop1 and Prop 2 are always the same , Prop3 varies. this class I want to retrieve from a longer the end should be something like select new MyEx { Prop1=something; Prop2= something2; Prop3=something3; } ...