Why doesn't Sun do a C# to Java byte code compiler?

We Want to Run Our C# Code on the JVM My company has a large C# code base. Well over half of this code is our core engine for creating, reading, modifying, calculating and writing Excel workbooks....

Nested Enum and Property Naming Conflicts

There are some related questions here and here, but they didn't really give me satisfactory answers. The problem is that enums nested in a class in C# cannot have the same name as a property of...

In-memory XML manipulation

I'm trying to do a find and replace in an OpenXML word document which I've openened into a MemoryStream. using (WordprocessingDocument _document = WordprocessingDocument.Open(_ms, true)) { var...

Get a List of Generic Types Applied to Any Class

I have a particular need which I cannot seem to figure out. I've done some research into this, but cannot find a feasible solution. I have a base class: public abstract class BaseProvider<T>...

content query web part xsl regex

I'm trying to transform an incoming text property in my XSL using a regular expression, something similar to: <xsl:value-of select="replace(@Telephone, '^*.{}')" /> but this does not seem to...

What happens if C# event handler disposed and I call it?

This question is a follow up to the C# Events and Thread Safety question (I am not the author of that one) and the related blog post by Eric Lippert Events and Races. There are other similar...

Entity Framework and POCO

I am learning about the Entity Framework and POCOs and while I like a lot of the concepts, I think I am not quite getting it. Here's an example: I have a schema like the following: create table...

Restricting a generic type parameters to have a specific constructor

I'd like to know why the new constraint on a generic type parameter can only be applied without parameters, that is, one may constraint the type to have the parameterless constructor, but one...

Lambda expressions for refactor-safe ArgumentException

Update: This is no longer an issue from C# 6, which has introduced the nameof operator to address such scenarios (see MSDN). Note: Refer to “Getting names of local variables (and parameters)...

How do I break down a chain of member access expressions?

The Short Version (TL;DR): Suppose I have an expression that's just a chain of member access operators: Expression<Func<Tx, Tbaz>> e = x => x.foo.bar.baz; You can think of this expression as a...

Conditional styling of an element in visual structure

I have trouble making a universal solution for next problem: Imagine a custom TreeView control that a;;pws theming - there is a list of elements in separate xaml file that is used to build a...

Domain-Driven Design approach to loading files or blobs?

I'm trying to keep my entities persistence and service-ignorant, but I'm running into a snag when it comes to BLOB- and file-correspondent properties of entities. Say I have, within an aggregate,...

What to return when overriding Object.GetHashCode() in classes with no immutable fields?

Ok, before you get all mad because there are hundreds of similar sounding questions posted on the internet, I can assure you that I have just spent the last few hours reading all of them and have...

vector type and one dimension array in OpenCl

I'd like to implement two versions of my kernel, a vector and a scalar versions. Now I'm wondering whether let's say double4 type is similar in term of memory access to a array of double of size...

CSS - "The sum of the horizontal components of a block-level element box always equals the width of the parent?"

I am reading CSS The Definitive Guide by Eric Meyer. On page 162, it says the following: Almost as simple is the rule that says that the sum of the horizontal components of a block-level element...

Polymer Behaviors sharing properties

I started to use polymer (V1.0) in a spare time project and observed a maybe buggy behavior. I have the following structure <section data-route="editor"> <paper-material...

Kentico image attachment error

I'm using Kentico v9 I have a content only Page Type with a Rich Text field. The user edits the text and using the toolbar, clicks the image icon to add an image. They choose a file. It uploads...

Why does filling a SpatialLinesDataFrame with lines throw an error?

I'm having trouble aggregating lines, resulting from a loop, in a SpatialLinesDataFrame (or similar). I have a range of coastlines which I itirate over, create perpendicular transects at equal...

Dockerized Kafka TimeoutException with localhost

Hi I got an issue with my dockerized kafka server. It does not create messages when send by kafka-console-producer.bat to localhost The eror message is: ERROR Error when sending message to topic...

Relevant tags