1. Mateycho

    Question Custom Validation Attributes in .NET Core

    Hi guys, I am really struggling the previous week to find out why is there a difference when I pass the error property through the constructor of my custom validation attribute or when I pass it explicitly. I have been looking through the source code so much that my eyes started hurting, hah...
  2. Dragon4ik

    Resolved CustomValidationAttribute doesn't work

    Hi. everyone! Actually this question is the continuation of Question, but now I have the same problem on ASP.Net MVC I have the following task : write the validation attribute, which checks, if String format is right to parse into DateTimeOffset and if it isn't, app should throw an Exception. I...
  3. Dragon4ik

    Resolved CustomAttribute doesn't work

    Hi, everybody! I try to create attribute, which would validate a string format for parsing into DateTimeOffset. Here is DateStringAttribute code: public class DateStringAttribute : ValidationAttribute { public override bool IsValid(object value) { string date =...
  4. J

    Question Writing to documents without opening them

    Hi, I know that I can write to open documents using the "Application.ActiveDocument" attribute. Is there a way to edit a document without opening them? I need to edit thousands of documents, and I'd like to write a script for this. If I need to open each document one at a time, it kind of...
  5. O

    Understanding Attributes in C #

    A lot of times i look at tutorials in C sharp and i understand it well , but when it comes to reading a real sample code , i get confused and i could not relate what i have read to a real code. For example i understand that attributes are used for some kind of tagging and it is also used for...
Top Bottom