class-library

C# class library, Silverlight class library , asmx web services WTH

久未见 提交于 2019-12-11 07:57:50
问题 ASMX services do not have ability to reuse the Silverlight Class library and Silverlight application needs dedicated Class library and not the C# class library. So i had to duplicate the C# class library code to a Silverlight class library to work with my Silverlight application, now that was not the problem here. I would like technical answers(In depth if possible) to these questions Why is it that Silverlight needs dedicated Silverlight Class library. Even though it runs above a layer on

Parallel.ForEach not setting all values in loop

﹥>﹥吖頭↗ 提交于 2019-12-11 05:19:21
问题 I am querying a sql data base for some employees. When i receive these employees I and looping each one using the Parallel.ForEach. The only reason I'm looping he employees that was retrieved from the database is so expand a few of the properties that I do not want to clutter up the data base with. Never-the-less in this example I am attempting to set the Avatar for the current employee in the loop, but only one out of three always gets set, none of the other employees Avatar ever gets set to

Class library lost intellisense in VS2017 after .NET Core MVC auto-migration

社会主义新天地 提交于 2019-12-11 03:24:11
问题 After migrating a VS2015 MVC Core application with two projects (web app and class library) to VS2017 I've lost intellisense on all views within the class library. Pretty much everything in every single view is broken, so I'm sure it's something fairly basic that the migration tool didn't take care of for me. Even the @model directive in each razor view is an error. The csproj looks like this: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>netcoreapp1.1</TargetFramework>

C# - Getting references of reference

谁说胖子不能爱 提交于 2019-12-10 23:47:49
问题 I have built a class library project, that references a couple dll's. In the constructor of my class library project I use some enums from one of the referenced dll's. When using my class library in another project is it possible to not have to add references to my dll and the ones my class library project references internally? 回答1: It depends on what you mean by reference internally . If your application project uses type A from your class library, and that class does not expose any public

Java: online card game library/class/e.g [closed]

夙愿已清 提交于 2019-12-10 19:33:56
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I am looking for java example solution/library/class for online card game. I'm interested in creating a non-profit version of a game called "Thousand", with functionality to play human vs human and human vs AI. I'll appreciate any kind of advise. 回答1: There's JPC-API which provides general playing card services

How can i call a method from library to C# console

Deadly 提交于 2019-12-10 18:43:26
问题 i created a method in a new library this is my code namespace ClassLibrary1 { public class Class1 { public static bool ISprime(int prime) { if (prime < 2) return false; else if (prime == 2) return true; else { for (int i = 2; i < prime; i++) { if (prime % i == 0) return false; else return true; } } } } } how can i call that method in my console " program.cs " i got an error that said " Error 2 'ClassLibrary1.Class1.ISprime(int)': not all code paths return a value" what does that mean ? sorry

Export Unmanaged Classes from a Visual C++ DLL?

这一生的挚爱 提交于 2019-12-10 18:04:43
问题 When creating a DLL with Visual C++ 2008 I have a couple of choices. I can create a "Class Library" , which I understand will actually give me a .Net Library that uses the CLI (managed) extenstion of C++. Since I don't want that, and I assumed that I need a static .LIB file to link into another Visual C++ windows executable project, I choose instead "Win32 Project" and, on the Application Settings panel, specify a C++ (no MFC) DLL. This will create a project with a .cpp file which is supposed

How to resolve environment variables programatically in C# without using Environment Enum? [duplicate]

↘锁芯ラ 提交于 2019-12-10 16:25:22
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Expand environment variable for My Documents We often use %% delimited environment variables in Command prompt in Windows Xp, 7, Vista, Server 2003-2008R2 and possibly in future windows versions. Examples are: %windir% %systemroot% %temp% I need to be able to programatically resolve these environment variables using C#. Please do not suggest Environmen.SpecialFolder , because i am getting values from a

Need a C# Assembly to reference a strongly named assembly loosely

China☆狼群 提交于 2019-12-10 15:22:56
问题 So here's the problem. I'm writing some StyleCop plug-in assemblies for use at the company I work for. As such, these assemblies need to reference Microsoft.StyleCop.CSharp.dll for example, which is strongly named. The problem comes in that if I build this and pass it along to the developers in my group, they must have the same version of the StyleCop dll (currently 4.3.3.0) or it fails to load. What is the best way to make my add-on rules DLL more independent? Should I just install my 4.3.3

Where are config files for class libraries physically located?

谁说胖子不能爱 提交于 2019-12-10 10:55:51
问题 My guess is that this question will fall under the category of "duh", but, nevertheless, I'm confused. When using config files in, for example, a Windows Forms Application, the config file can be found in C:\Program files\CompanyName\ProductName\Application.exe.config . However, with the class library I'm developing I do not see a " ClassLibrary.dll.config " file in the install folder after installing it (in tandem with another project) from Visual Studio. Even though I do not see the file