4 answers

Not Trimming white spaces from a string in c#

Trim() Function Not Working Please Help its not trimming the white space. string samplestring = "172-6573-4955"; string[] array = samplestring .Split('-'); string firstElem …

4 answers | 13 secs ago by Shah Abdullah on Stack Overflow stackoverflow.com
2 answers

C# more specific version on generic function

I have the following function public static T Translate<T>(T entity) { .... } Now if T is en IEnumerable<> I want to have a different behaviour so I made a second function public ...

2 answers | 37 secs ago by Vogabe on Stack Overflow stackoverflow.com
0 answers

async DB operations

My workflows are hosted in IIS. and each workflow inherits from asynccodeactivity. In BeginExecute, I call command.Beginxxx and in end execute i call EndExecutexxx. I'm using Database Access Block ...

2 answers

WPF: How to bind a command to the ListBoxItem using MVVM?

I have just started learning MVVM. I've made the application from scratch by following this MVVM tutorial (I highly recommend it to all MVVM beginners out there). Basically, what I have created so far …

0 answers

How to access data from SharePoint page url?

I am a beginner in SharePoint. I need to connect to Office 365 – SharePoint edition of our site using rest service. Then I have to connect to it's subsite and then I have to pull all elements of a ...

1 answer

Passing selected value of dropdownlist as property of Model asp.net mvc

I am trying to get the selected value of three properties of my model, using dropdownlist that populate the next dropdownlist using a script. So my problem is that I replace the EF code by this: …

0 answers

Access to registry seems to be different from different sources

I am trying to add a registry key in my C# code under # HKEY_CLASSES_ROOT\*\shell\blabla (I want the user to be able to send any file to my application, kind of like "open with UltraEdit" or so). I …

1 answer

Should the domain layer receive a dependency DTO directly?

This may have been asked before, but I am accessing a dependency web service in my data access layer and I need to ask if I should be repackaging the DTOs returned from that service into my own DTOs? …

0 answers

Windows Store 8.1. XAML Progress Bar between pages

I am having a problem with a page in my Windows 8.1 Store App that is taking a long time to render - it is a grid with a number of columns and rows that gets bound to data on loading of the page. It …

3 answers

Generic extension method resolution fails

The following program does not compile, because in the line with the error, the compiler chooses the method with a single T parameter as the resolution, which fails because the List<T> does not …

5 answers

How to read user settings in app.config from a diff app?

I have a WinForms .exe with an App.config that has a bunch of User Scoped Settings that are set at runtime and saved. I want to be able to use the WinForms app to change and save the settings and ...

5 answers | 3 mins ago by D.K. Mulligan on Stack Overflow stackoverflow.com
0 answers

Create a form on an ASPX page in asp.net

I am trying to create a form with a post on my aspx page in my asp.net application. <form method="POST" action="https://www.vcs.co.za/vvonline/vcs.aspx"> <input type="hidden" ...

1 answer

Partial methods and inheritance from non-partial classes

I imported a table from the database using designer, then I've edited the corresponding cs file to add extra functionality to the model (it's a partial exactly for this reason). Now I came up with ...

2 answers

Strange behavior of type casting

I'm trying create some type from assembly. That type implements interface IDerrivedInterface, which inherits from interface IBaseInterface. So, I'm going to create instance of type, that implements …

1 answer

Using a C# dll in a C++ application

I have to replace a DLL in an old project. This project can't be changed (downward compatibility, other producer etc) and has the following Methodsignature: typedef UINT(*CALLBACK Initialise)(); ...

1 answers | 5 mins ago by Mitja S. on Stack Overflow stackoverflow.com
1 answer

Writing to the event log with hierarchy

I know there are a lot of topics about writing to the event viewer on SO, but I didn't find what I need. I have the following code to create a new Event Log Category in the event Viewer: string ...

2 answers

Executing sql procedures which contains GO statement with c#

I am trying to build a program which execute sql statements in batch with error handling (therefore I am not using SMO). the problem is that GO is not a part of SQL and when using .NET to execute the …

2 answers | 6 mins ago by Nadav Stern on Stack Overflow stackoverflow.com
4 answers

Save a Eval as bool without code behind

I only need this one variable in the front end of the page. I am trying to achieve something like this: <% bool YesNo = Eval("isParent") == "True" ? true : false %> Data binding doesnt ...

4 answers | 7 mins ago by Jack on Stack Overflow stackoverflow.com
0 answers

Execute exchange management shell cmdlets using C#?

I am trying to execute the following exchange management shell cmdlets using C# in order to get total number of mailbox on the server. cmdlets:- Get-mailbox -resultsize unlimited My code snippet …

4 answers

Sort through a dictionary and concatenate values depending on keys

I have a dictionary object Dictionary<double, byte[]> that has keys such as 1.0, 1.1, 1.2, 2.0, 2.1, 2.2, 2.3, 2.4, 3.0, 4.0, ... I need to concatenate the values (byte[]) such that values …

4 answers | 10 mins ago by Manas on Stack Overflow stackoverflow.com
0 answers

How to resize a WPF user control used in Winform When the Winform application resizes

i am new to wpf and using a wpf user control in a winform application inside a system.windows.forms.tabpage . wpf control code <UserControl x:Class="VMS_TimelineControl.WpfTimeline" …

1 answer

How to change a value of an attribute?

in the last days i tried to change a value of a single attribute of this application File The Xml-File: <?xml version="1.0" encoding="utf-8"?> <asmv1:assembly ...

1 answers | 10 mins ago by Gentle on Stack Overflow stackoverflow.com
0 answers

Microsoft.Interop.Vbe Version 15.0 missing on machines

I've been developing a C# program for quite some time now (2+ years at a company) and never had any problems with the references before. Now the computers where I deploy the program to with ClickOnce …

0 answers

How to clip non-closed geometry

Intro I noticed an issue while implementing clipping (see this). It looks like UIElement.Clip still render invisible parts Rendering relatively small geometry (lines to only fill 1920x1200 area …

1 answer

Delphi 7 And __ArrayList

In Delphi 7: How do I get read an array list that is returned in a COM DLL made ​​in C #? I tried this: var products: IList; begin products := MyClass.Products() as IList; //... end; This …

1 answers | 15 mins ago by ECC on Stack Overflow stackoverflow.com
1 answer

How can I get rid of the namespace prefix from XElement like this (C#)?

I have got an xml string like this, and I am trying to deserialize it to an object with class Credentials. But the namespace prefix is stopping me. The Credentials class itself doesn't have any ...

1 answers | 17 mins ago by bigbearzhu on Stack Overflow stackoverflow.com
1 answer

Json.Net exception Could not evaluate expression

I'm getting this "Could not evaluate expression" serialization output when I try to serialize a big list. Is there any way to prevent this behaviour? The worst part is that there is no common ...

1 answers | 18 mins ago by Enlacumbre on Stack Overflow stackoverflow.com
5 answers

How can I parse this datetime string?

I can't figure it out, where did I go wrong? I got the following datetime string, and need to parse it to datetime: string timestr = "1/20/2014 12:05:16 AM" And I trying to parse it like this: …

0 answers

Binding MVVM WPF

public class MainViewModel : PlayerViewModel { ... } public class PlayerViewModel : ViewModelBase { private PlaylistManagerViewModel _plistManagerViewModel; public PlaylistManagerViewModel …

1 answer

List Of errors in the modelState

I want to see all the errors of the ModelState in the Quick of visual studio without writing any codes like : foreach (ModelState modelState in ViewData.ModelState.Values) { foreach (ModelError …

15 30 50 per page
1 2 3