.net

Command Line Compiling a Win Forms C# Application

霸气de小男生 提交于 2021-02-06 13:58:11
问题 I'm trying to create a script to compile an Windows Forms C# 2.0 project from the command line (I know, I know.. I'm reinventing the wheel.. again.. but if somebody knows the answer, I'd appreciate it). The project is a standard Windows Forms project that has some resources and references a couple external assemblies. Here is a list of the files: Program.cs // no need to expand on this on :) frmMain.cs // this is a typical C# windows forms file frmMain.designer.cs // .. and the designer code

Command Line Compiling a Win Forms C# Application

筅森魡賤 提交于 2021-02-06 13:57:50
问题 I'm trying to create a script to compile an Windows Forms C# 2.0 project from the command line (I know, I know.. I'm reinventing the wheel.. again.. but if somebody knows the answer, I'd appreciate it). The project is a standard Windows Forms project that has some resources and references a couple external assemblies. Here is a list of the files: Program.cs // no need to expand on this on :) frmMain.cs // this is a typical C# windows forms file frmMain.designer.cs // .. and the designer code

C# 4 bit data type [closed]

孤街醉人 提交于 2021-02-06 13:55:16
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . Improve this question Does C# have a 4 bit data type? I want to make a program with variables that waste the minimum amount of memory, because the program will consume a lot. For example: I need to save a value that i know it will go from 0 to 10 and a 4 bit var can go from 0 to

How to use Reflection in FluentValidation?

无人久伴 提交于 2021-02-06 13:55:15
问题 I have a scneario in which I want to use reflection to do validation using FluentValidation. Someting like this: public class FooValidator : AbstractValidator<Foo> { public FooValidator(Foo obj) { // Iterate properties using reflection var properties = ReflectionHelper.GetShallowPropertiesInfo(obj); foreach (var prop in properties) { // Create rule for each property, based on some data coming from other service... //RuleFor(o => o.Description).NotEmpty().When(o => // this works fine when foo

C# 4 bit data type [closed]

邮差的信 提交于 2021-02-06 13:54:08
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . Improve this question Does C# have a 4 bit data type? I want to make a program with variables that waste the minimum amount of memory, because the program will consume a lot. For example: I need to save a value that i know it will go from 0 to 10 and a 4 bit var can go from 0 to

Create a “directory” in memory?

走远了吗. 提交于 2021-02-06 11:24:39
问题 I'm working in c#, and looking for a way to create a path to a directory that will map to an IO.Stream instead of to the actual file system. I want to be able to "save" files to that path, manipulate the content or file names, and then save them from that path to a regular file in the file system. I know I can use a temporary file, but I would rather use the memory for both security and performance. This kind of thing exists, according to this answer, in Java , using the FileSystemProvider

Create a “directory” in memory?

为君一笑 提交于 2021-02-06 11:20:27
问题 I'm working in c#, and looking for a way to create a path to a directory that will map to an IO.Stream instead of to the actual file system. I want to be able to "save" files to that path, manipulate the content or file names, and then save them from that path to a regular file in the file system. I know I can use a temporary file, but I would rather use the memory for both security and performance. This kind of thing exists, according to this answer, in Java , using the FileSystemProvider

One Message for rule chain?

你。 提交于 2021-02-06 11:02:33
问题 I'm having an issue with FluentValidation where I want to display one message regardless of the validation error in a given chain. For example, I've defined a validation chain for one property below. I would expect that the chain would be evaluated and any failures would result in the message defined in the WithMessage() call below. However, it seems that it's short-circuiting and only displaying the FluentValidation default error message for the first error encountered. See code below:

One Message for rule chain?

ε祈祈猫儿з 提交于 2021-02-06 10:58:33
问题 I'm having an issue with FluentValidation where I want to display one message regardless of the validation error in a given chain. For example, I've defined a validation chain for one property below. I would expect that the chain would be evaluated and any failures would result in the message defined in the WithMessage() call below. However, it seems that it's short-circuiting and only displaying the FluentValidation default error message for the first error encountered. See code below:

One Message for rule chain?

假如想象 提交于 2021-02-06 10:57:46
问题 I'm having an issue with FluentValidation where I want to display one message regardless of the validation error in a given chain. For example, I've defined a validation chain for one property below. I would expect that the chain would be evaluated and any failures would result in the message defined in the WithMessage() call below. However, it seems that it's short-circuiting and only displaying the FluentValidation default error message for the first error encountered. See code below: