5 answers

Can await corrupt a value when called concurrently

Put simply, I have something like this: class MyClass { double SomeProperty {get; private set;} public async Task SomeMethod() { SomeProperty = await ...

2 answers

How to pass div to the while loop, asp.net c#

I am creating a social network website as facebook, but that website has an error with posing status , i used following code to post status.This code is on page load, Label1.Text = ...

4 answers

In Service Oriented Architecture (SOA), should each service own its own data?

Under Service Oriented Architecture (SOA), I am interested in the question of whether a service should own its own data or not. One of the constraints is that if anything fails at any point, we need ...

4 answers | 3 mins ago by Contango on Stack Overflow stackoverflow.com
2 answers

HttpContext.Current.User.Identity.Name is empty using IIS Express but not Visual Studio Development Server

HttpContext.Current.User.Identity.Name is empty/blank when Visual Studio is set to "Use Local IIS Web server" but works correctly when Visual Studio is set to "Use Visual Studio Development Server". ...

1 answer

How do I pass float array pointers to Volumemeter

I am trying to use the SharpDX VolumeMeter in Xaudio2. I want to use SetEffectParameters to pass a VolumeMeterLevels object but the object only has a public int ChannelCount and not the two pointers ...

1 answers | 7 mins ago by WJM on Stack Overflow stackoverflow.com
2 answers

Linq syntax for a nested join query

So the premise is I have a table called recipes, each recipe has ingredients. And I want to build a shopping list. Currently what I am doing is :- List<ingredient> UsedIngredients = new ...

2 answers

C# Console.read() not displaying proper number input?

String name = Console.ReadLine(); System.Console.WriteLine("input name"); System.Console.WriteLine("hello {0}", name); int hello = Console.Read(); ...

2 answers | 10 mins ago by Matt Jones on Stack Overflow stackoverflow.com
0 answers

How can I sync two Xaudio2 Streaming SourceVoices

I am using the streaming principles from SharpDX Samples (https://github.com/sharpdx/SharpDX-Samples/blob/master/WindowsDesktop/XAudio2/AudioPlayerApp/AudioPlayer.cs) to play several sounds at the ...

0 answers

How to read a xml request from server into a dictionary key value

I am looking to read the following into a key value dictionary for a web service. Dictionary<string, string> att = new Dictionary<string, string>(); <Req> ...

3 answers

T4 template adding assembly of existing project in solution

Hi I need to add the assembly of an an existing project in my solution in my T4 Template file. The problem is that my T4 template is in a project called Project.WebApi and the class that I need in my ...

3 answers | 15 mins ago by aleczandru on Stack Overflow stackoverflow.com
0 answers

chain trust vs peer trust certificate authentication

Let me first start my giving my understanding on Chain Trust: --> With Chain Trust you trust a root authority and any certificates from the same root are trusted. --> Which means this allows ...

0 answers

WCF only first call succeds when using transport security

I ran into a problem securing a WCF service using a tcp binding. It throws an error stating "The target principal name is incorrect". The binding is net.tcp, security mode is tranport and client ...

0 answers

How to add application to camera card autorun

I want to add my program to the autorun list that is displayed when I insert the SD card from a camera. The application will be a WPF desktop application in C#. If needed I could use WinForms as well. ...

1 answer

How can I use the path with “ApplicationData” in XAML?

So what I want to do is something like this: <XmlDataProvider x:Key="BookData" Source="(LocalApplicationData)\MyApp\bookdata.xml" XPath="Books"/> from ...

1 answers | 36 mins ago by Naetmul on Stack Overflow stackoverflow.com
12 answers

How do I read a specified line in a text file?

Given a text file, how would I go about reading an arbitrary line and nothing else in the file? Say, I have a file test.txt. How would I go about reading line number 15 in the file? All I've seen ...

12 answers | 38 mins ago by ankushg on Stack Overflow stackoverflow.com
1 answer

How to prevent Visual Studio from adding SAK to prj files

I want the following gone from my prj files: <SccProjectName>SAK</SccProjectName> <SccLocalPath>SAK</SccLocalPath> <SccAuxPath>SAK</SccAuxPath> ...

0 answers

c# WebBrowser automation - Dropdown Lists

I trying to automate a webpage with the following code: void wb_DocumentCompleted(object sender, System.Windows.Forms.WebBrowserDocumentCompletedEventArgs e) { string url = ...

2 answers

Access JSON item with variable key name

The following is my JSON data which happens to be the format supplied by Wikidata, although greatly trimmed down for clarity. { "entities": { "Q200405": { "id": "Q200405", "type": ...

2 answers | 44 mins ago by MortimerCat on Stack Overflow stackoverflow.com
0 answers

No matching bindings are available, and the type is not self-bindable when using Lazy<T>

Thanks in advance for those of you taking the time to read this! I am attempting to use Ninject to resolve the items contained in a pair of cascading listboxes named CategoryListBox and ...

4 answers

Programatically building an MSI

I would like to create a C# program that creates an MSI based on a number of parameters. For example, based on user settings, certain files would be included, or runtime parameters set. Can anyone ...

2 answers

Cannot attach the file ‘{0}' as database '{1}'. Code first. Local SQL EXPRESS Instance. VS 2010 SP1. Windows XP

I've been using Code First approach. I created a sql express local database "Database.mdf" in Visual Studio 2010 SP1 using MVC 4 template. When I try to run my project at my PC, I get an error: ...

1 answer

Passing a button to an event handler

I want to pass a button to an event handler outside the scope of the button object. For example: void OnClick2(object sender, EventArgs e) { button123.text="changed"; } So I want my click to ...

1 answer

Monogame + WP8.1 - Orientation resets after ApplyChanges

I am creating a small custom 2D game engine and I am stuck setting up the orientation for my game. I would like to use only LandscapeRight, therefore I set the PageOrientation and SupportedOrientation ...

1 answer

How can I set up a generic paging object that lives on top of my generic collection object?

I have been working on removing a lot of code duplication from my application, specifically around my models. Several models also have a collection variant that is an IEnumerable of the model type. ...

4 answers

how is a tuple different from a class?

how is a tuple different from a class? instead of the following code, we can make a class with 3 fields and make objects from it. How is this Tuple different from that? Is it only reducing the code we ...

4 answers | 56 mins ago by nasim on Stack Overflow stackoverflow.com
0 answers

List<ComplexType> : need to do a linq query on a property of the ComplexType

As an example, I have a type like this: public class Stuff { public Double StuffAmount; public String StuffDescription; public DateTime StuffDate; } I need to check for things like standard ...

4 answers

How to check if string is only Numeric and AlphaNumeric and not character string?

I have a sample data in where have to determine whether the string is numeric or alpha numeric but not a simple character string. for ex: my data is: 123XY 12346 WEPXY What is the condition that ...

0 answers

Accessing shared folders (SMB) with FolderPicker

I'm writing an app for Windows Phone 8.1 (update 1 if that matters...). I've been searching for days before posting, and haven't find a positive answer till now. All I need is to copy from (and maybe ...

0 answers

How to access Office365 Sharepoint (2013) Documents like News/Bulletin along with CSS content in c#?

The following code access the sharepoint list. var ctx = new ClientContext("http://tests.com"); var lists = ctx.Site.RootWeb.Lists; ctx.Load(lists); ctx.ExecuteQuery(); foreach (var list in lists) ...

0 answers

Disable WCF Help page not woking

I want to disable the help page for WCF service. It is the file which ends with Service.svc/help. As recommended elsewhere I added the following to my web.config <serviceDebug ...

15 30 50 per page
1 2 3