Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8400535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:34:57+00:00 2026-06-09T21:34:57+00:00

I am trying to do the following expression, but I keep running into this

  • 0

I am trying to do the following expression, but I keep running into this exception, “Cannot find property setter for ‘chars’.”

Here is the expression:

xstr, str : string;
for i := 1 to length(str) do
begin
  if ((i mod 2)<>0) then
  begin
    xstr[i] := char(Ord(str[i]) xor $AA);  <<<<------ Exception Raised
  end
  else
  begin
    xstr[i] := char(Ord(str[i]) xor $55);  <<<<------ Exception Raised
  end;
end;

The value of “str” is passed into the encryption method.

This is part of an encryption method. What is the best way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T21:34:58+00:00Added an answer on June 9, 2026 at 9:34 pm

    System.String is an immutable class, meaning you cannot modify instances of it. .NET requires modifying string operations to create new instances of a string. For your purpose, it’s probably easiest and most efficient to create a char array of the modified characters and then construct a string from that.

    In general, the System.Text.StringBuilder class offers a mutable string instance.

    In fact, even if it weren’t for the immutability of strings, your code would fail because you didn’t allocate a string, so assignment to xstr[i] would yield in a buffer overflow exception. You need to do that when using an array of char.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to execute this code nmea2kml.cpp but I keep getting the following errors.
I am trying to convert the following SQL into a LINQ expression SELECT COUNT(ID)
currently I'm trying to find a regular expression with the following condition: Match: FOO_.*
I've been trying to do the following using VBs Regular Expression object but could
I have the following regular expression: /(?<={index:)\d+(?=})/g I am trying to find index integer
I am trying to work a webflow project but I keep getting the following
I'm trying to combine the following expressions into a single expression: item => item.sub,
tried to find the problem for this but nothings really working. Basically, I'm trying
I am trying to search for files which matches following expression with sed [a-zA-Z0-9]{1,10}\s{1,5}\
In objective-c I am trying to evaluate the following expression: _c = _f /

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.