How to set DateTimeFormatInfo.CurrentInfo and NumberFormatInfo.CurrentInfo to invariant?How do I calculate someone's age in C#?How do I enumerate an enum in C#?How do I create an Excel (.XLS and .XLSX) file in C# without installing Microsoft Office?How do I get a consistent byte representation of strings in C# without manually specifying an encoding?How do I update the GUI from another thread?How to loop through all enum values in C#?Reading settings from app.config or web.config in .netHow do I remedy the “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?How do I generate a random int number?What is a NullReferenceException, and how do I fix it?
Reusing story title as chapter title
Colors and corresponding numbers
Pretty heat maps
Why couldn't soldiers sight their own weapons without officers' orders?
Improve survivability of bicycle container
Drawing complex inscribed and circumscribed polygons in TikZ
Is it really ~648.69 km/s delta-v to "land" on the surface of the Sun?
Should I self-publish my novella on Amazon or try my luck getting publishers?
Why did the RAAF procure the F/A-18 despite being purpose-built for carriers?
How do we avoid CI-driven development...?
sed delete all the words before a match
How can you evade tax by getting employment income just in equity, then using this equity as collateral to take out loan?
In Pokémon Go, why does one of my Pikachu have an option to evolve, but another one doesn't?
Who are these characters/superheroes in the posters from Chris's room in Family Guy?
What is the idiomatic way of saying “he is ticklish under armpits”?
Simple book on model theory
First amendment and employment: Can an employer terminate you for speech?
Generator for parity?
Improving software when the author can see no need for improvement
Ordering a word list
How should an administrative assistant reply to student addressing them as "Professor" or "Doctor"?
Reading Data from XML and storing them into SQL Database
Is TA-ing worth the opportunity cost?
Infeasibility in mathematical optimization models
How to set DateTimeFormatInfo.CurrentInfo and NumberFormatInfo.CurrentInfo to invariant?
How do I calculate someone's age in C#?How do I enumerate an enum in C#?How do I create an Excel (.XLS and .XLSX) file in C# without installing Microsoft Office?How do I get a consistent byte representation of strings in C# without manually specifying an encoding?How do I update the GUI from another thread?How to loop through all enum values in C#?Reading settings from app.config or web.config in .netHow do I remedy the “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning?How do I generate a random int number?What is a NullReferenceException, and how do I fix it?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am refactoring some unit tests and found out that some parsing strategies rely on DateTime.TryParseExact and sbyte.TryPase which themselves rely on NumberFormatInfo.CurrentInfo and DateTimeFormatInfo.CurrentInfo.
In order to make my unit tests properly arranged, I decided to setup the CurrentInfo property of both NumberFormatInfo and DateTimeFormatInfo to their invariant flavours through:
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
However, out of curiosity I tried to check whether the respective InvariantInfo were setup through a unit test and turns out that no, they are not. I am wondering what I am missing here to have the InvariantCulture enforced in those those two CurrentInfo
[Fact]
public void ShouldReturnInvariantInfo()
CultureInfo.CurrentCulture.NumberFormat = NumberFormatInfo.InvariantInfo;
CultureInfo.CurrentCulture.DateTimeFormat = DateTimeFormatInfo.InvariantInfo;
NumberFormatInfo.CurrentInfo.Should().Be(NumberFormatInfo.InvariantInfo);
DateTimeFormatInfo.CurrentInfo.Should().Be(DateTimeFormatInfo.InvariantInfo);
Knowing that the underlying implementations:
NumberFormatInfo.InvariantInfo:
public static NumberFormatInfo CurrentInfo
get
CultureInfo currentCulture = CultureInfo.CurrentCulture;
if (!currentCulture._isInherited)
NumberFormatInfo numInfo = currentCulture.numInfo;
if (numInfo != null)
return numInfo;
return (NumberFormatInfo) currentCulture.GetFormat(typeof (NumberFormatInfo));
DateTimeFormatInfo.CurrentInfo:
public static DateTimeFormatInfo CurrentInfo
get
CultureInfo currentCulture = CultureInfo.CurrentCulture;
if (!currentCulture._isInherited)
DateTimeFormatInfo dateTimeInfo = currentCulture.dateTimeInfo;
if (dateTimeInfo != null)
return dateTimeInfo;
return (DateTimeFormatInfo) currentCulture.GetFormat(typeof (DateTimeFormatInfo));
c# .net .net-core cultureinfo
add a comment |
I am refactoring some unit tests and found out that some parsing strategies rely on DateTime.TryParseExact and sbyte.TryPase which themselves rely on NumberFormatInfo.CurrentInfo and DateTimeFormatInfo.CurrentInfo.
In order to make my unit tests properly arranged, I decided to setup the CurrentInfo property of both NumberFormatInfo and DateTimeFormatInfo to their invariant flavours through:
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
However, out of curiosity I tried to check whether the respective InvariantInfo were setup through a unit test and turns out that no, they are not. I am wondering what I am missing here to have the InvariantCulture enforced in those those two CurrentInfo
[Fact]
public void ShouldReturnInvariantInfo()
CultureInfo.CurrentCulture.NumberFormat = NumberFormatInfo.InvariantInfo;
CultureInfo.CurrentCulture.DateTimeFormat = DateTimeFormatInfo.InvariantInfo;
NumberFormatInfo.CurrentInfo.Should().Be(NumberFormatInfo.InvariantInfo);
DateTimeFormatInfo.CurrentInfo.Should().Be(DateTimeFormatInfo.InvariantInfo);
Knowing that the underlying implementations:
NumberFormatInfo.InvariantInfo:
public static NumberFormatInfo CurrentInfo
get
CultureInfo currentCulture = CultureInfo.CurrentCulture;
if (!currentCulture._isInherited)
NumberFormatInfo numInfo = currentCulture.numInfo;
if (numInfo != null)
return numInfo;
return (NumberFormatInfo) currentCulture.GetFormat(typeof (NumberFormatInfo));
DateTimeFormatInfo.CurrentInfo:
public static DateTimeFormatInfo CurrentInfo
get
CultureInfo currentCulture = CultureInfo.CurrentCulture;
if (!currentCulture._isInherited)
DateTimeFormatInfo dateTimeInfo = currentCulture.dateTimeInfo;
if (dateTimeInfo != null)
return dateTimeInfo;
return (DateTimeFormatInfo) currentCulture.GetFormat(typeof (DateTimeFormatInfo));
c# .net .net-core cultureinfo
add a comment |
I am refactoring some unit tests and found out that some parsing strategies rely on DateTime.TryParseExact and sbyte.TryPase which themselves rely on NumberFormatInfo.CurrentInfo and DateTimeFormatInfo.CurrentInfo.
In order to make my unit tests properly arranged, I decided to setup the CurrentInfo property of both NumberFormatInfo and DateTimeFormatInfo to their invariant flavours through:
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
However, out of curiosity I tried to check whether the respective InvariantInfo were setup through a unit test and turns out that no, they are not. I am wondering what I am missing here to have the InvariantCulture enforced in those those two CurrentInfo
[Fact]
public void ShouldReturnInvariantInfo()
CultureInfo.CurrentCulture.NumberFormat = NumberFormatInfo.InvariantInfo;
CultureInfo.CurrentCulture.DateTimeFormat = DateTimeFormatInfo.InvariantInfo;
NumberFormatInfo.CurrentInfo.Should().Be(NumberFormatInfo.InvariantInfo);
DateTimeFormatInfo.CurrentInfo.Should().Be(DateTimeFormatInfo.InvariantInfo);
Knowing that the underlying implementations:
NumberFormatInfo.InvariantInfo:
public static NumberFormatInfo CurrentInfo
get
CultureInfo currentCulture = CultureInfo.CurrentCulture;
if (!currentCulture._isInherited)
NumberFormatInfo numInfo = currentCulture.numInfo;
if (numInfo != null)
return numInfo;
return (NumberFormatInfo) currentCulture.GetFormat(typeof (NumberFormatInfo));
DateTimeFormatInfo.CurrentInfo:
public static DateTimeFormatInfo CurrentInfo
get
CultureInfo currentCulture = CultureInfo.CurrentCulture;
if (!currentCulture._isInherited)
DateTimeFormatInfo dateTimeInfo = currentCulture.dateTimeInfo;
if (dateTimeInfo != null)
return dateTimeInfo;
return (DateTimeFormatInfo) currentCulture.GetFormat(typeof (DateTimeFormatInfo));
c# .net .net-core cultureinfo
I am refactoring some unit tests and found out that some parsing strategies rely on DateTime.TryParseExact and sbyte.TryPase which themselves rely on NumberFormatInfo.CurrentInfo and DateTimeFormatInfo.CurrentInfo.
In order to make my unit tests properly arranged, I decided to setup the CurrentInfo property of both NumberFormatInfo and DateTimeFormatInfo to their invariant flavours through:
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
However, out of curiosity I tried to check whether the respective InvariantInfo were setup through a unit test and turns out that no, they are not. I am wondering what I am missing here to have the InvariantCulture enforced in those those two CurrentInfo
[Fact]
public void ShouldReturnInvariantInfo()
CultureInfo.CurrentCulture.NumberFormat = NumberFormatInfo.InvariantInfo;
CultureInfo.CurrentCulture.DateTimeFormat = DateTimeFormatInfo.InvariantInfo;
NumberFormatInfo.CurrentInfo.Should().Be(NumberFormatInfo.InvariantInfo);
DateTimeFormatInfo.CurrentInfo.Should().Be(DateTimeFormatInfo.InvariantInfo);
Knowing that the underlying implementations:
NumberFormatInfo.InvariantInfo:
public static NumberFormatInfo CurrentInfo
get
CultureInfo currentCulture = CultureInfo.CurrentCulture;
if (!currentCulture._isInherited)
NumberFormatInfo numInfo = currentCulture.numInfo;
if (numInfo != null)
return numInfo;
return (NumberFormatInfo) currentCulture.GetFormat(typeof (NumberFormatInfo));
DateTimeFormatInfo.CurrentInfo:
public static DateTimeFormatInfo CurrentInfo
get
CultureInfo currentCulture = CultureInfo.CurrentCulture;
if (!currentCulture._isInherited)
DateTimeFormatInfo dateTimeInfo = currentCulture.dateTimeInfo;
if (dateTimeInfo != null)
return dateTimeInfo;
return (DateTimeFormatInfo) currentCulture.GetFormat(typeof (DateTimeFormatInfo));
c# .net .net-core cultureinfo
c# .net .net-core cultureinfo
asked Mar 27 at 7:37
Ehouarn PerretEhouarn Perret
1,7252 gold badges14 silver badges38 bronze badges
1,7252 gold badges14 silver badges38 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If I understand you right, you want to run some code (tests) under culture which is Current one, except NumberFormat and DateTimeFormat which are Invariant. If it's your case, I suggest to Clone the current culture and modify the clone:
// Current culture clone
CultureInfo testCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
// modified: current culture except Number and DateTime which are Invariant
testCulture.NumberFormat = CultureInfo.InvariantCulture.NumberFormat;
testCulture.DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat;
// and, finally, set back as current
CultureInfo.CurrentCulture = testCulture;
Let's have a look at formats
Console.Write(ReferenceEquals(CultureInfo.CurrentCulture.DateTimeFormat,
CultureInfo.InvariantCulture.DateTimeFormat)
? "Equals"
: "Not Equals");
Outcome:
Equals
Edit: In order to run code using the modified culture we can implement a class for it:
public class TestCulture : IDisposable
private CultureInfo m_SavedCulture;
private CultureInfo m_TestCulture;
private bool m_IsDisposed;
public TestCulture()
m_SavedCulture = CultureInfo.CurrentCulture;
m_TestCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
m_TestCulture.NumberFormat = CultureInfo.InvariantCulture.NumberFormat;
m_TestCulture.DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat;
CultureInfo.CurrentCulture = m_TestCulture;
protected vitrual void Dispose(bool disposing)
if (disposing)
if (!m_IsDisposed && ReferenceEquals(CultureInfo.CurrentCulture, m_TestCulture))
CultureInfo.CurrentCulture = m_SavedCulture;
m_IsDisposed = true;
public void Dispose() => Dispose(true);
And then use it as follows:
using (new TestCulture())
// Tests which should be run under the specific culture
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55371994%2fhow-to-set-datetimeformatinfo-currentinfo-and-numberformatinfo-currentinfo-to-in%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If I understand you right, you want to run some code (tests) under culture which is Current one, except NumberFormat and DateTimeFormat which are Invariant. If it's your case, I suggest to Clone the current culture and modify the clone:
// Current culture clone
CultureInfo testCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
// modified: current culture except Number and DateTime which are Invariant
testCulture.NumberFormat = CultureInfo.InvariantCulture.NumberFormat;
testCulture.DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat;
// and, finally, set back as current
CultureInfo.CurrentCulture = testCulture;
Let's have a look at formats
Console.Write(ReferenceEquals(CultureInfo.CurrentCulture.DateTimeFormat,
CultureInfo.InvariantCulture.DateTimeFormat)
? "Equals"
: "Not Equals");
Outcome:
Equals
Edit: In order to run code using the modified culture we can implement a class for it:
public class TestCulture : IDisposable
private CultureInfo m_SavedCulture;
private CultureInfo m_TestCulture;
private bool m_IsDisposed;
public TestCulture()
m_SavedCulture = CultureInfo.CurrentCulture;
m_TestCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
m_TestCulture.NumberFormat = CultureInfo.InvariantCulture.NumberFormat;
m_TestCulture.DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat;
CultureInfo.CurrentCulture = m_TestCulture;
protected vitrual void Dispose(bool disposing)
if (disposing)
if (!m_IsDisposed && ReferenceEquals(CultureInfo.CurrentCulture, m_TestCulture))
CultureInfo.CurrentCulture = m_SavedCulture;
m_IsDisposed = true;
public void Dispose() => Dispose(true);
And then use it as follows:
using (new TestCulture())
// Tests which should be run under the specific culture
add a comment |
If I understand you right, you want to run some code (tests) under culture which is Current one, except NumberFormat and DateTimeFormat which are Invariant. If it's your case, I suggest to Clone the current culture and modify the clone:
// Current culture clone
CultureInfo testCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
// modified: current culture except Number and DateTime which are Invariant
testCulture.NumberFormat = CultureInfo.InvariantCulture.NumberFormat;
testCulture.DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat;
// and, finally, set back as current
CultureInfo.CurrentCulture = testCulture;
Let's have a look at formats
Console.Write(ReferenceEquals(CultureInfo.CurrentCulture.DateTimeFormat,
CultureInfo.InvariantCulture.DateTimeFormat)
? "Equals"
: "Not Equals");
Outcome:
Equals
Edit: In order to run code using the modified culture we can implement a class for it:
public class TestCulture : IDisposable
private CultureInfo m_SavedCulture;
private CultureInfo m_TestCulture;
private bool m_IsDisposed;
public TestCulture()
m_SavedCulture = CultureInfo.CurrentCulture;
m_TestCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
m_TestCulture.NumberFormat = CultureInfo.InvariantCulture.NumberFormat;
m_TestCulture.DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat;
CultureInfo.CurrentCulture = m_TestCulture;
protected vitrual void Dispose(bool disposing)
if (disposing)
if (!m_IsDisposed && ReferenceEquals(CultureInfo.CurrentCulture, m_TestCulture))
CultureInfo.CurrentCulture = m_SavedCulture;
m_IsDisposed = true;
public void Dispose() => Dispose(true);
And then use it as follows:
using (new TestCulture())
// Tests which should be run under the specific culture
add a comment |
If I understand you right, you want to run some code (tests) under culture which is Current one, except NumberFormat and DateTimeFormat which are Invariant. If it's your case, I suggest to Clone the current culture and modify the clone:
// Current culture clone
CultureInfo testCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
// modified: current culture except Number and DateTime which are Invariant
testCulture.NumberFormat = CultureInfo.InvariantCulture.NumberFormat;
testCulture.DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat;
// and, finally, set back as current
CultureInfo.CurrentCulture = testCulture;
Let's have a look at formats
Console.Write(ReferenceEquals(CultureInfo.CurrentCulture.DateTimeFormat,
CultureInfo.InvariantCulture.DateTimeFormat)
? "Equals"
: "Not Equals");
Outcome:
Equals
Edit: In order to run code using the modified culture we can implement a class for it:
public class TestCulture : IDisposable
private CultureInfo m_SavedCulture;
private CultureInfo m_TestCulture;
private bool m_IsDisposed;
public TestCulture()
m_SavedCulture = CultureInfo.CurrentCulture;
m_TestCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
m_TestCulture.NumberFormat = CultureInfo.InvariantCulture.NumberFormat;
m_TestCulture.DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat;
CultureInfo.CurrentCulture = m_TestCulture;
protected vitrual void Dispose(bool disposing)
if (disposing)
if (!m_IsDisposed && ReferenceEquals(CultureInfo.CurrentCulture, m_TestCulture))
CultureInfo.CurrentCulture = m_SavedCulture;
m_IsDisposed = true;
public void Dispose() => Dispose(true);
And then use it as follows:
using (new TestCulture())
// Tests which should be run under the specific culture
If I understand you right, you want to run some code (tests) under culture which is Current one, except NumberFormat and DateTimeFormat which are Invariant. If it's your case, I suggest to Clone the current culture and modify the clone:
// Current culture clone
CultureInfo testCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
// modified: current culture except Number and DateTime which are Invariant
testCulture.NumberFormat = CultureInfo.InvariantCulture.NumberFormat;
testCulture.DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat;
// and, finally, set back as current
CultureInfo.CurrentCulture = testCulture;
Let's have a look at formats
Console.Write(ReferenceEquals(CultureInfo.CurrentCulture.DateTimeFormat,
CultureInfo.InvariantCulture.DateTimeFormat)
? "Equals"
: "Not Equals");
Outcome:
Equals
Edit: In order to run code using the modified culture we can implement a class for it:
public class TestCulture : IDisposable
private CultureInfo m_SavedCulture;
private CultureInfo m_TestCulture;
private bool m_IsDisposed;
public TestCulture()
m_SavedCulture = CultureInfo.CurrentCulture;
m_TestCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
m_TestCulture.NumberFormat = CultureInfo.InvariantCulture.NumberFormat;
m_TestCulture.DateTimeFormat = CultureInfo.InvariantCulture.DateTimeFormat;
CultureInfo.CurrentCulture = m_TestCulture;
protected vitrual void Dispose(bool disposing)
if (disposing)
if (!m_IsDisposed && ReferenceEquals(CultureInfo.CurrentCulture, m_TestCulture))
CultureInfo.CurrentCulture = m_SavedCulture;
m_IsDisposed = true;
public void Dispose() => Dispose(true);
And then use it as follows:
using (new TestCulture())
// Tests which should be run under the specific culture
edited Mar 27 at 9:04
answered Mar 27 at 7:48
Dmitry BychenkoDmitry Bychenko
121k14 gold badges115 silver badges149 bronze badges
121k14 gold badges115 silver badges149 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55371994%2fhow-to-set-datetimeformatinfo-currentinfo-and-numberformatinfo-currentinfo-to-in%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown