.net

finding control in winforms panel

I need to find a child control in a winforms panel. I was wondering if there is a method similar to Panel.FindControl() of the asp.net webforms panel in the .net winforms version ...

Using DataAnnotations 4.0

I am using DA 4.0 with a MVC application and have created a custom validator as shown below: public static ValidationResult NumberOfItems(int numItems, ValidationContext pValidationContext) { if (numItems == 1) { //Tag as critical error //return new ValidationResult... } ...

What is WCF webHTTPbinding from TCP point of view?

What is WCF webHTTPbinding from TCP point of view? So - how hard it is from not needed data flow it is? How hard it is in compare to other WCF bindings? ...

Where has XamlPad gone in .NET 4.0 / Windows SDK v7.1 / Visual Studio 2010?

I can't find XamlPad anywhere after I installed .NET 4.0 / Visual Studio 2010 and Windows 7 SDK - v7.1. I tried searching C:\Program Files\Microsoft SDKs\Windows\v7.1\bin and did a dir /s xamlpad.exe to see if the Windows Index service didn't get to that folder yet. And it's not under Start Menu -> All Programs -> Windows SDK v7.1 --> ...

.net vs other top technologies

Hello, I would like to ask You all, what do You think about the future of .Net technology comparing to other top fashion technologies (for example from google). Is it possible that within few years all solutions will be developed in other technologies than .Net. Is it worth learning .Net solutions looking into the future ? ...

what is [] brackets in .net ?

Hello i have seen [] such brackets in c# very very rarely but when i start to learn asp.net i have seen them many times but still i couldn't understand what they does ? They are not part of code as using for arrays.For example [webmethods] which is just over the methods or there are some over classes. Are they part of .net or they are...

Ordering by formula fields in NHibernate

Suppose that I have the following mapping with a formula property: <class name="Planet" table="planets"> <id name="Id" column="id"> <generator class="native" /> </id> <!-- somefunc() is a native SQL function --> <property name="Distance" formula="somefunc()" /> </class> I would like to get all planets and orde...

What is the best scalable architecture to build services for Windows Phone 7 apps to connect to?

I want to build my first Windows Phone 7 application and I'm going to need a service backend. Should I be using something like NServiceBus? WCF? Any suggestions would be helpful. I'm guessing the Cloud (Azure) would be the best place to host this service? ...

Can a sql server aggregate udf be passed in multiple parameters?

I am trying to write an aggregate udf for using Sql Server 2008 and C# 3.5 that implodes an aggregation of data. The kind of syntax I am looking for is: SELECT [dbo].[Implode]([Id], ',') FROM [dbo].[Table] GROUP BY [ForeignID] where the second parameter is the delimiter for the aggregate function. And example return value would be s...

How to receive arrays through WebHttpBinding?

Will anything like [OperationContract] [WebGet] string IWannaRead(int[] ids); work? And how to form a link\url (www.example.com/service.svc?ids=1,2,3,4,5,6,7,8) for the request? ...

Recommended library for linear programming in .Net?

Can anyone recommend a library - free, or commercial but affordable ( There are some listed here: http://en.wikipedia.org/wiki/Linear_programming#Solvers_and_scripting_.28programming.29_languages ....but I am just starting out with LP and hope someone can recommend something. I am trying to basically minimize pricing for cell phone su...

How events are assigned in .NET

I just realized I don't fully understand why in .NET you assign events using a += symbol. I figured this out yesterday when I needed to remove an event and without thinking I was doing someobject.onsomeevent += null thinking that would just remove the event I had previously assigned. After some investigation, I figured out I had to ...

Integration of C#, F#, IronPython and IronRuby

I was told that the assembly files made from C# and F# source is interoperable as they are compiled into .NET assembly. Q1 : Does that mean that C# can call F# functions just like they are C# functions? Q2 : How about the IronPython and IronRuby? I don't see any assembly dll from the IronPython/IronRuby. Q3 : Is there any easy way to ...

Castle DynamicProxy : How to Proxy Equals when proxying an interface ?

I need to use Castle DynamicProxy to proxy an interface by providing an instance of it to ProxyGenerator.CreateInterfaceProxyWithTarget. I also need to make sure that calls to Equals, GetHashCode and ToString hits the methods on the concrete instance, that I am passing, and I can't get that to work. In other words, I'd like this small ...

Using Function return in global variable vb.net

Can't seem to figure out how to use a function return variable in global Dims example code: Public Class Main Dim Path As String = FixPath() Dim fixwrongtxt As String = Path & "tryme.txt" Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load FixPath() On_load() End Sub ...

WPF Toolkit DataGrid - Finding only visible/currently viewable rows

I'm using the WPF Toolkit's DataGrid to display a set of search results. As per then scenario in my other question I want to be able to pre-fetch secondary results for each of my viewable (that is, within the visible scroll area) rows in the datagrid. I want to be able to: Query "viewable" rows Raise an event when rows become visible ...

Get a property value with only the object and the name of the property (but not the type)

Suppose I have a method that passes in the name of a property (as a string) and the object that the property is on (as object). How could I get the value of the property? Here is some code to make it a bit more concrete: protected override void Paint(Graphics g, Rectangle bounds, CurrencyManager source, int rowNum, Brush backBrush, Br...

How to parse mathematical expressions involving parentheses

This isn't a school assignment or anything, but I realize it's a mostly academic question. But, what I've been struggling to do is parse 'math' text and come up with an answer. For Example - I can figure out how to parse '5 + 5' or '3 * 5' - but I fail when I try to correctly chain operations together. (5 + 5) * 3 It's mostly just bu...

How do I run a .NET Unit Test repeatedly with a set of parameters cartesianed

I have 1 unit test method that needs several parameters. I would like to run this test once for every possible value of a cartesian with a predefined list for each parameter. I imagine that parameters could be passes in via the test context, but I do not want to connect to an external database. For example: If I had 2 parameters with...

Is it bad karma to use Silverlight 4 but keep using .NET Framework 3.5?

Question is in the title, thanks for your help! ...