Skip to content

Commit 3a74902

Browse files
Modified the variable name
1 parent 18ea4a6 commit 3a74902

File tree

1 file changed

+2
-4
lines changed
  • Content-Controls/Add-tick-mark-checkbox/Add-tick-mark-checkbox

1 file changed

+2
-4
lines changed

Content-Controls/Add-tick-mark-checkbox/Add-tick-mark-checkbox/Program.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
// Set the initial state of the "Female" checkbox to checked
3333
checkedCheckBox.ContentControlProperties.IsChecked = true;
3434

35-
// Gets the last paragraph.
36-
paragraph = document.LastParagraph;
3735
// Add text to the paragraph.
3836
paragraph.AppendText("\tMale ");
3937
// Append checkbox content control to the paragraph for the "unchecked" option.
@@ -45,8 +43,8 @@
4543
uncheckedCheckBox.ContentControlProperties.IsChecked = false;
4644

4745
// Save the document.
48-
using (FileStream outputStream1 = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.OpenOrCreate, FileAccess.ReadWrite))
46+
using (FileStream outputStream = new FileStream(Path.GetFullPath(@"Output/Result.docx"), FileMode.OpenOrCreate, FileAccess.ReadWrite))
4947
{
50-
document.Save(outputStream1, FormatType.Docx);
48+
document.Save(outputStream, FormatType.Docx);
5149
}
5250
}

0 commit comments

Comments
 (0)