Questions tagged [class-library]

A collection of classes combined into a unit maybe distributed by a third party. It may have dependencies to further libraries.

A collection of classes combined into a unit maybe distributed by a third party. It may have dependencies to further libraries.

Frameworks usually use this quite a lot.

1024 questions
0
votes
1 answer

Can't cast a collection property from a VB library in a C# application

I'm trying to use a old VB library in a C# application. This library has a couple of classes, one in particular has a method returns an instance of itself example: Posts post = new Posts().GetLast(); The Posts class has a property Comments that is…
Atzoya
  • 1,377
  • 13
  • 31
0
votes
1 answer

ASP.net mvc shared Class Library

I have created a .net class library that is used to create reports from any of our projects. The situation is that I reference the class library dll in my asp.net mvc project. Than when a button is clicked I call a shared method within the class…
Matt
  • 3,305
  • 11
  • 54
  • 98
-1
votes
1 answer

Need guidelines to improved image processing library

I am working on image processing library in c#. want to improve performance/speed and better memory management. I am using Bitmap class and its just array manipulations. Can someone suggest me, how to improve it. any guidelines?
Kamran Qadir
  • 466
  • 10
  • 20
-1
votes
1 answer

C# Run Class Library

I am building a C# project in Jetbrains Rider. When the project is finished, I want to include it in another project by building a dll and adding the dll to the project. To generate a dll, I need to set the Output Type to Class Library. However,…
-1
votes
1 answer

Insert text for every instance of a certain character [c#]

Hello, I cannot seem to find a past question on this topic so I took it upon myself to ask firsthand. Here I have a string that I would like to read: 1234567890123456789012345678901234567890 For each time that the number 4 is displayed, I would…
WillDevv12
  • 33
  • 4
-1
votes
1 answer

Modern Location for Connection Strings in .Net 5+ Projects Utilizing Class Libraries or a Data Access Layer?

It seems that many .net tutorials storing connection strings are very simple projects not using a separate data access layer, or are fairly old. What is the current best practice for storing a connection string in a c# project (I'm using a web API)…
-1
votes
1 answer

How to make a class library reference another class library that contains just an interface?

I have an interface IMaths which contains a single function ADD as follows. The name of this project is MyInterface which also becomes the default namespace. The code is as follows. Class InterfaceHolder Interface IMaths Function…
Sougata
  • 319
  • 1
  • 10
-1
votes
3 answers

How to test void methods?

In my most recent homework, we were provided a class library and told to complete unit testing to ensure the changes we made to comply with SOLID didn't break the code. The problem I have is that all the methods are void. I may just be ignorant but…
-1
votes
1 answer

Create class library in C# with developer methods

How i can create hidden methods in C#? For sample: The class library should only include methods in the release that are publicly available to read a file. In the debug or developer build there should also exist methods and classes to write these…
Adrian Preuss
  • 3,228
  • 1
  • 23
  • 43
-1
votes
1 answer

How to include a VB project in a C# Solution

I am very new to C# and visual studio and I am currently playing around with the idea that multiple languages can be mixed in a solution (C# project and VB project in the same solution). I found what seems to be a stupid simple…
XCELLGUY
  • 179
  • 2
  • 12
-1
votes
1 answer

Is it possible to run Windows Form Code from c# Class Library without launching the form application?

I have a class library project in C# where some code doesn't work due to some file access issues. But same code works in windows form application. Is it possible to call windows form application from class library without launching it? Somehow…
Abner
  • 11
  • 6
-1
votes
1 answer

asp.net class library that talks to ef and customizable

I'm trying to make a class library that contains only the core logic of may app. I've seen many tutorials that do this but they include the EF core inside that library. What I want to do is put only all the logic such, adding a category if it…
-1
votes
2 answers

Using a File directory as a parameter

EDITED: Apologies for the errors - I understand a wan't super clear. I have created a class library which i want to fill with multiple methods/functions. I am working on one of those methods however i am struggling to use the method using a custom…
Zypherr
  • 53
  • 10
-1
votes
1 answer

A forgotten warning's consequences in [VS] - errors not showing up

I skipped a very important warning and later I noticed my errors weren't showing up. Here's what happened . . . A Warning popped up when I hit the play button to test my class library from a other windows form application in the solution explorer.…
-1
votes
1 answer

Naming classes in shared project

I have a shared Project.Core class library and there are public class SomeClass { //properties //methods } public class AnotherClass { //properties //methods } then I have an web app (Project.Web) and desktop app (Project.Client)…
kemakino
  • 1,041
  • 13
  • 33