it's a sharepoint page, if access from web app 1 with app pool 1, attachement works but if try from web app 2 which is annonymos with app pool 2, it won't attach to debug
But I'm trying to understand... You try to add to the set and it throws an exception? The set checks the values or the address of the reference type? Because **I think** that if you change the value of an item of an array, the address will be the same...
but, if you change the value, the hashcode will be different, but the dictionary will not change the object's position in the array
@PichiWuana depends on how the hashcode is computed
most classes will take the hashcode of their fields and take the sum, while multiplying by a nice looking prime number with each field
that way, you get quite unique hashcodes
the more unique they are, the better they work
if you exclude some fields of a class in the equals and hashcode, the objects will be considered the same if only those fields are different
you could read up a shit ton of stuff about equals/hashcode and dictionaries, but for the time being, you shouldnt care about it
all you should care about for AoC is that a HashSet<T> will be the fastest way to check if the set contains an object equal to your input using the Contains(input) method
and that you are not allowed to change objects that are added to it using the Add(object) method
if the type of said object does not override the default implementation of Equals, it will just fall back to the default implementation which does a simple reference check
this made me crazy why datetimeobj.ToString("yyyy/MM/dd", faIR); result is not same ,i know compiler is same,dot net version is same,windows datetime setting is on iran and same as my local pc.
i.e. I learned that it checks whether both reference types point to same location in the memory
user5500750
Do you think this code will always find the initial in a name: Regex regex = new Regex(@"\s[A-Z]{1}[\.]{1}"); Match initalMatch = regex.Match(fullNameAsScraped); if (!String.IsNullOrEmpty(initalMatch.Value)) { //Code to run if an initial is found. }
Hello, If i have an Date (not date time) stored in the database in UTC, when i read the value it set the timezone to my local: +1 in the Datetime object. Is to correct that all dates then is yyyy-mm-dd 01:00:00 ?
@Wietlol Ye, does not make it any better that the official API for integration with the software that uses MS SQL uses same method to fetch dates and datetime, but when there is an date to be fetched, it converts it to Julian date and epcoh time for datetime.
@Wietlol coludnt find my problem solution ? ;)i always had errors that no body could solve it...somtimes i colud solve within monthes. but this one seems not to be solved
why datetimeobj.ToString("yyyy/MM/dd", faIR); result is not same ,i know compiler is same,dot net version is same,windows datetime setting is on iran and same as my local pc.
https://en.wikipedia.org/wiki/Julian_day If i use the offical API it will return an integer for the date, then you manually calculate it and convert it to an System.DateTime object
I understand how switch statemetns work (or so I thought) but what is a switch statement which can show the type and value? I'm trying to learn what it is called to research it.
A normal switch switch(i) { case 1: return 0; etc....
And now
switch(e) {
case MyMainException _: //code case MyException abc: //code
@Wietlol one server return gregorian date instead of persian date time and an other return persian date time that this one is correct.why that other one not return same date
i have did it with its tag in my webconfig and not helped,if the problem was from this config why it work on fiddle server with english culture? i also added your line in my page load but not helped